How to get clear sound from /dev/dsp(/dev/audio)

How to get clear sound from /dev/dsp(/dev/audio)

Post by Bomshik Ki » Sun, 13 Aug 2000 04:00:00



Hello~

I want to know "How to get clear sound from /dev/dsp".
I use the ioctl function in order to get 16bit signed
integer, 8KHz sampled sound.

But the sound(voice) gotten from /dev/dsp (by opening /dev/dsp and
 reading that file_descriptor(fd) ) is not clear. There is some noise
(or scratch sound) in voice.(I think that it is not
 a problem of sound-card/microphone)

I tried to open /dev/dsp with O_RDONLY and read the fd
for some seconds to get voice, saved the voice data in memory.
After that, I closed the fd, reopen /dev/dsp with
O_WRONLY, and write the saved voice data to a new file-descriptor.
In this manner, I didn't hear scratch-sound.

But opening /dev/dsp with O_RDWR, and read/write voice data make
 some scratch sound.

open O_RDONLY -> read sound -> close ->
open O_WDONLY -> write sound -> close -> open O_RDONLY -> ...
It means that a sound-block read from sound_card
(not voice data of some duration) is played back as soon as possible
Repeating this sequence also makes scratch sound which is the bigger
scratch sound than the sound of O_RDWR mode.

I want to open /dev/dsp O_RDWR, set up the file descriptor
to full duplex mode, and read/write the fd without scrath sound.

Is it impossible to reduce scratch sound in opening /dev/dsp
withO_RDWR mode ?

Thank you for reading...

BS Kim

 
 
 

1. How to get clear sound from /dev/dsp(/dev/audio)

Hello

I want to know "How to get clear sound from /dev/dsp".
I use the ioctl function in order to get 16bit signed
integer, 8KHz sampled sound.

But the sound(voice) gotten from /dev/dsp (by opening /dev/dsp and
 reading that file_descriptor(fd) ) is not clear. There is some noise
(or scratch sound) in voice.(I think that it is not
 a problem of sound-card/microphone)

I tried to open /dev/dsp with O_RDONLY and read the fd
for some seconds to get voice, saved the voice data in memory.
After that, I closed the fd, reopen /dev/dsp with
O_WRONLY, and write the saved voice data to a new file-descriptor.
In this manner, I didn't hear scratch-sound.

But opening /dev/dsp with O_RDWR, and read/write voice data make
 some scratch sound.

open O_RDONLY -> read sound -> close ->
open O_WDONLY -> write sound -> close -> open O_RDONLY -> ...
It means that a sound-block read from sound_card
(not voice data of some duration) is played back as soon as possible
Repeating this sequence also makes scratch sound which is the bigger
scratch sound than the sound of O_RDWR mode.

I want to open /dev/dsp O_RDWR, set up the file descriptor
to full duplex mode, and read/write the fd without scrath sound.

Is it impossible to reduce scratch sound in opening /dev/dsp
withO_RDWR mode ?

Thank you for reading...
BS Kim

2. Accton Etherpocket support?

3. /dev/dsp, /dev/audio, /dev/midi., /dev/sndsta

4. solstice backup 6 through firewall

5. Sound config: /dev/audio vs /dev/dsp

6. problem with kreversi

7. /dev/dsp and /dev/audio in OSS sound engine

8. ramfs as root filesystem

9. 2.2.1 and /dev/dsp and /dev/audio

10. /dev/dsp and /dev/audio in kernel 2.2.6?

11. /dev/dsp and /dev/audio

12. problem linking support for /dev/audio and /dev/dsp

13. Using /dev/audio and /dev/dsp