Hello,

There are two interfaces, MediaPlayerInterface and
 MediaPlayerHWInterface.....both are derived from MediaPlayerBase class. If
you wanna use AudioFlinger software mixer than you have to
use MediaPlayerInterface(As per google, don't have much knowledge on mixer
front). In setDataSource function we are creating AudioOutput,
  if (!p->hardwareOutput()) {
            mAudioOutput = new AudioOutput();

 static_cast<MediaPlayerInterface*>(p.get())->setAudioSink(mAudioOutput);
        }

There is a check in AudioPlayer start() function to decide whether to use
AudioSink (if it's already created) or create a new AudioTrack for rendering
Audio.....mAudioSink->open() creates a new AudioTrack(mediaPlayerInterface)
and configures the audio driver, ....Just by creating AudioTrack in
AudioPlayer, I think you can render the Audio but I don't know abt
internals...I'm just using MediaPlayerInterface.

Thanks and regards,
-Lakshman








On Wed, Jul 28, 2010 at 5:56 AM, Daniel Charles <dcharl...@gmail.com> wrote:

> Hi all,
>
> I'm interested on learning the difference between using AudioTrack and
> AudioSink within Stagefreight's AudioPlayer class. I have seen that
> inside AudioPlayer AudioTrack is used as long as AudioSink was not
> created.  AudioSink gets created only when MediaPlayerService creates
> a player and it has not a HardwareOutput.
>
> How could I use AudioTrack instead of AudioSink?  Which is the
> difference between these two.  AFAIU, both are connected to
> audioflinger somehow.
>
> I appreciate any hint on this.
>
> Thanks.
>
> --
> Daniel.
>
> --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to