Hi, do you have any samples of Java code to access to this audio
device, in fact a way to write and read into this msm_pcm_out driver?


On Sep 16, 4:55 pm, Chris Stratton <[email protected]> wrote:
> Apps run as unpriveleged users and so can't access the audio device
> directly.  You are supposed to do sound through the java apis.
>
> pgil wrote:
> > I would like to open an mp3 file with my own audio player(based on
> > mplayer and FFmpeg) I packaged in a apk file. It runs fine using
> > command line and the executable version but not when packaged in apk.
> > I got the messages using adb logcat window:
>
> > I/stdout  ( 2115): PCM: Samplerate: 48000Hz Channels: Stereo Format
> > s16le
> > I/stdout  ( 2115): [AO PCM] Info: Faster dumping is achieved with -vc
> > null -vo null -ao pcm:fast
> > I/stdout  ( 2115): [AO PCM] Info: To write WAVE files use -ao
> > pcm:waveheader (default).
> > I/stderr  ( 2115): [AO PCM] Failed to open /dev/msm_pcm_out for
> > writing!
> > I/stderr  ( 2115): Failed to initialize audio driver 'pcm:file=/dev/
> > msm_pcm_out'
> > I/stderr  ( 2115): Could not open/initialize audio device -> no sound.
> > I/stdout  ( 2115): Audio: no sound
> > I/stdout  ( 2115): Video: no video
> > I/stdout  ( 2115): Exiting... (End of file)
>
> > I put the permission in the manifest file as follows:
>
> >   <uses-permission
> > android:name="android.permission.WRITE_SECURE_SETTINGS"></uses-
> > permission>
> >   <uses-permission android:name="android.permission.WRITE_SETTINGS"></
> > uses-permission>
> >   <uses-permission android:name="android.permission.RECORD_AUDIO"></
> > uses-permission>
> >   <uses-permission
> > android:name="android.permission.MODIFY_AUDIO_SETTINGS"></uses-
> > permission>
> >   <uses-permission android:name="android.permission.FACTORY_TEST"></
> > uses-permission>
> >   <uses-permission android:name="android.permission.HARDWARE_TEST"></
> > uses-permission>
> >   <uses-permission android:name="android.permission.INTERNET"></uses-
> > permission>
> >   <uses-permission
> > android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-
> > permission>
>
> > Any idea about what's wrong! Any help would be appreciated.
>
> > best regards
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to