android oss? problems - no audio w/ puredata

OSS specific Linux discussion (x86/amd64)

Moderators: hannu, dev, kodachi, cesium

android oss? problems - no audio w/ puredata

Postby hcother » Fri Dec 14, 2012 5:45 am

I posted this to a puredata forum first but thought I might ask this forum for OSS specific information such as more detailed logs to determine what is going wrong. I understand that I have guessed that the driver on my Android is OSS and there's no guarantee it's "really" OSS.

Hi. I have a rooted Motorola Defy running Android but with the debian-kit installed so I'm using Terminal Emulator to shell in and use a debian/gnu-ish system over android. I can use sox/play/chuck.oss just fine with environment variables AUDIODEV=/dev/snd/dsp and AUDIODRIVER=oss but when I try puredata it doesn't make any sounds. I've tried the same sort of patch in windows and linux and it seems to work fine though in linux I did try the command line style of running that I mention below and it doesn't seem to take hold of the audio like the UI does.

Any ideas? Is there more logging info I can give to figure this out?

I have to disable the adc because Android has a hold of that and typically if I try to access that it crashes the phone.

Here's what I am using:

root@localhost:~# explain pdng
pd -d 99 -noadc -verbose -stderr -oss -nogui -send ";pd dsp 1" $@

root@localhost:~# cat sin.pd
#N canvas 6 2 588 513 12;
#X obj 108 109 osc~ 440;
#X obj 108 168 dac~;
#X connect 0 0 1 0;

root@localhost:~# pdng sin.pd
sys_audioapi 2
Pd version 0.42-6
compiled 15:27:15 Jul 18 2010
tried /root/sin.pd and succeeded
input channels = 0, output channels = 2
opened /dev/dsp for writing only

setchan 2
error: OSS: SOUND_DSP_READ_CHANNELS failed /dev/dsp
opened audio output on /dev/dsp; got 2 channels
setting nfrags = 8, fragsize 1024

audiobuffer set to 50 msec
OSS: requested audio buffer size 8816 limited to 0
^CPd: signal 2
root@localhost:~#
hcother
 
Posts: 2
Joined: Fri Dec 14, 2012 5:43 am

Re: android oss? problems - no audio w/ puredata

Postby igorzwx » Fri Dec 14, 2012 12:38 pm

hcother wrote:I posted this to a puredata forum first but thought I might ask this forum for OSS specific information such as more detailed logs to determine what is going wrong. I understand that I have guessed that the driver on my Android is OSS and there's no guarantee it's "really" OSS.

Hi. I have a rooted Motorola Defy running Android but with the debian-kit installed so I'm using Terminal Emulator to shell in and use a debian/gnu-ish system over android. I can use sox/play/chuck.oss just fine with environment variables AUDIODEV=/dev/snd/dsp and AUDIODRIVER=oss but when I try puredata it doesn't make any sounds. I've tried the same sort of patch in windows and linux and it seems to work fine though in linux I did try the command line style of running that I mention below and it doesn't seem to take hold of the audio like the UI does.

Any ideas? Is there more logging info I can give to figure this out?

I have to disable the adc because Android has a hold of that and typically if I try to access that it crashes the phone.

Here's what I am using:

root@localhost:~# explain pdng
pd -d 99 -noadc -verbose -stderr -oss -nogui -send ";pd dsp 1" $@

root@localhost:~# cat sin.pd
#N canvas 6 2 588 513 12;
#X obj 108 109 osc~ 440;
#X obj 108 168 dac~;
#X connect 0 0 1 0;

root@localhost:~# pdng sin.pd
sys_audioapi 2
Pd version 0.42-6
compiled 15:27:15 Jul 18 2010
tried /root/sin.pd and succeeded
input channels = 0, output channels = 2
opened /dev/dsp for writing only

setchan 2
error: OSS: SOUND_DSP_READ_CHANNELS failed /dev/dsp
opened audio output on /dev/dsp; got 2 channels
setting nfrags = 8, fragsize 1024

audiobuffer set to 50 msec
OSS: requested audio buffer size 8816 limited to 0
^CPd: signal 2
root@localhost:~#


It seems that Android has ALSA inside: http://developer.oesf.biz/em/developer/ ... Sound.html
and, perhaps, other sort of "very advanced open source crap" such as PulseAudio.
ALSA: http://en.wikipedia.org/wiki/Advanced_L ... chitecture
http://en.wikipedia.org/wiki/PulseAudio

In short, your "OSS" is not OSS, it is the ALSA emulation of Open Sound System.
You may better ask for help on ALSA forum.
igorzwx
 
Posts: 863
Joined: Sun Jun 28, 2009 9:31 pm

Re: android oss? problems - no audio w/ puredata

Postby hcother » Fri Dec 14, 2012 4:19 pm

Shoot. I have seen that diagram before even and didn't pay attention. Thanks for the sanity. Odd thing is I couldn't get other apps to work using ALSA but I will try again trying to get puredata, sox, chuck to use alsa and/or pulseaudio. Won't bother oss anymore. :)
hcother
 
Posts: 2
Joined: Fri Dec 14, 2012 5:43 am


Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests

cron