4 #include<MdaAudioOutputStream.h>
6 const TInt KSilenceBuffer = 256;
18 virtual void Complete(TInt aState, TInt aError) = 0;
24 virtual TPtrC8 Data() = 0;
27 NONSHARABLE_CLASS(CStreamPlayer) : public CBase, public MMdaAudioOutputStreamCallback
30 CStreamPlayer(MStreamProvider& aProvider, MStreamObs& aObs);
34 static TInt ClosestSupportedRate(TInt aRate);
36 TInt OpenStream(TInt aRate, TInt aChannels, TUint32 aType = KMMFFourCCCodePCM16);
38 void SetVolume(TInt aNew);
40 TInt MaxVolume() const;
47 TBool Playing() const;
52 void MaoscOpenComplete(TInt aError) ;
53 void MaoscBufferCopied(TInt aError, const TDesC8& aBuffer);
54 void MaoscPlayComplete(TInt aError);
61 MStreamProvider& iProvider;
65 CMdaAudioOutputStream* iStream;
82 TBuf8<KSilenceBuffer> iSilence;