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
);
59 MStreamProvider
& iProvider
;
63 CMdaAudioOutputStream
* iStream
;
80 TBuf8
<KSilenceBuffer
> iSilence
;