mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-06 15:48:05 -04:00
initial import
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@2 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
2cadbd5e56
commit
cc68a136aa
341 changed files with 180839 additions and 0 deletions
85
platform/uiq3/engine/audio_mediaserver.h
Normal file
85
platform/uiq3/engine/audio_mediaserver.h
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*******************************************************************
|
||||
*
|
||||
* File: Audio_mediaserver.h
|
||||
*
|
||||
* Author: Peter van Sebille (peter@yipton.net)
|
||||
*
|
||||
* Modified/adapted for picodriveN by notaz, 2006
|
||||
*
|
||||
* (c) Copyright 2006, notaz
|
||||
* (c) Copyright 2001, Peter van Sebille
|
||||
* All Rights Reserved
|
||||
*
|
||||
*******************************************************************/
|
||||
|
||||
#ifndef __AUDIO_MEDIASERVER_H
|
||||
#define __AUDIO_MEDIASERVER_H
|
||||
|
||||
#include <Mda\Common\Audio.h>
|
||||
#include <MdaAudioOutputStream.h>
|
||||
|
||||
//#include "audio.h"
|
||||
#include "polledas.h"
|
||||
|
||||
const TInt KSoundBuffers = 4;
|
||||
|
||||
|
||||
class TGameAudioEventListener : public MMdaAudioOutputStreamCallback
|
||||
{
|
||||
public: // implements MMdaAudioOutputStreamCallback
|
||||
void MaoscOpenComplete(TInt aError);
|
||||
void MaoscBufferCopied(TInt aError, const TDesC8& );
|
||||
void MaoscPlayComplete(TInt aError);
|
||||
|
||||
TBool iIsOpen;
|
||||
// TBool iHasCopied;
|
||||
TInt iUnderflowed;
|
||||
TInt iLastError;
|
||||
};
|
||||
|
||||
|
||||
class CGameAudioMS // : public IGameAudio // IGameAudio MUST be specified first!
|
||||
{
|
||||
public: // implements IGameAudio
|
||||
TInt16 *NextFrameL(TInt aPcmFrames);
|
||||
TInt16 *ResumeL();
|
||||
void Pause();
|
||||
void ChangeVolume(TInt aUp);
|
||||
|
||||
public:
|
||||
~CGameAudioMS();
|
||||
CGameAudioMS(TInt aRate, TBool aStereo, TInt aWritesPerSec);
|
||||
static CGameAudioMS* NewL(TInt aRate, TBool aStereo, TInt aWritesPerSec);
|
||||
|
||||
protected:
|
||||
void WriteBlockL();
|
||||
void UnderflowedL();
|
||||
void ConstructL();
|
||||
|
||||
protected:
|
||||
void WaitForOpenToCompleteL();
|
||||
|
||||
TInt iRate;
|
||||
TBool iStereo;
|
||||
|
||||
CMdaAudioOutputStream *iMdaAudioOutputStream;
|
||||
TMdaAudioDataSettings iMdaAudioDataSettings;
|
||||
|
||||
TGameAudioEventListener iListener;
|
||||
|
||||
CPolledActiveScheduler *iScheduler;
|
||||
|
||||
HBufC8* iSoundBuffers[KSoundBuffers];
|
||||
TInt iWritesPerSec;
|
||||
TInt iBufferedFrames;
|
||||
TInt16* iCurrentPosition;
|
||||
TInt iCurrentBuffer;
|
||||
TInt iCurrentBufferSize;
|
||||
TInt iFrameCount;
|
||||
CMdaServer* iServer;
|
||||
|
||||
TInt64 iTime;
|
||||
TInt iVolume;
|
||||
};
|
||||
|
||||
#endif /* __AUDIO_MEDIASERVER_H */
|
Loading…
Add table
Add a link
Reference in a new issue