4 #include <mdaaudiooutputstream.h>
6 const int KMaxVolume
= 256;
18 virtual void Complete(int aState
, int aError
) = 0;
24 virtual TPtrC8
Data() = 0;
27 class CStreamPlayer
: public CBase
, public MMdaAudioOutputStreamCallback
30 CStreamPlayer(MStreamProvider
& aProvider
, MStreamObs
& aObs
);
33 static int ClosestSupportedRate(int aRate
);
35 int OpenStream(int aRate
, int aChannels
, TUint32 aType
= KMMFFourCCCodePCM16
);
37 void SetVolume(int aNew
);
44 bool Playing() const { return (iState
& EInited
) && (iState
& EStarted
); }
45 bool Closed() const { return !(iState
& EInited
) && !(iState
& EDied
); }
48 void MaoscOpenComplete(int aError
);
49 void MaoscBufferCopied(int aError
, const TDesC8
& aBuffer
);
50 void MaoscPlayComplete(int aError
);
54 MStreamProvider
& iProvider
;
58 CMdaAudioOutputStream
* iStream
;