Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-09

Audio development and /dev/dsp

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ik

Hello list,

I have a weird problem when I'm trying to use /dev/dsp using Alsa-oss. The first time I'm accessing /dev/dsp, the device works properly, and I have sound inside, however, when I try to access the device again, I'm getting

sox: Can't open output file '/dev/dsp': Device or resource busy

For example from the command "play" that uses that device.

Please note that his happens regardless of the program that uses the /dev/dsp device.

I also tried to use /dev/snd/pcm.... but without any luck (no error from using the descriptor, but no actual output is given.

I can't figure out what am I missing. And I do need to use the /dev/dsp (for several reasons that are not controlled by me).

lsof does not give me any open access to the device.

I'm using Kubunto 7.04 amd64.

Any pointers to look at well be more then welcome.

Thanks,
Ido

Reply by email

Micha Nelissen
to ik
ik wrote
lsof does not give me any open access to the device. I'm using Kubunto 7.04 amd64.

Buggy audio driver ? Does it work properly when using ALSA, aplay etc. ?

Micha

Reply by email

ik
to Micha Nelissen
Micha Nelissen wrote 6 lines
ik wrote: > lsof does not give me any open access to the device. > > I'm using Kubunto 7.04 amd64. Buggy audio driver ? Does it work properly when using ALSA, aplay etc. ?

Yes, with ALSA I do not have any problems. It seems that after several opening and closing of /dev/dsp, it become busy, for a while, until it free itself.

I'm opening /dev/dsp like so:
fpOpen('/dev/dsp', O_WRONLY or O_NONBLOCK, 0)

Micha

Ido

Reply by email