01-04-2012 06:43 AM
Preferred PCM vs Other PSM
while i was investigating how to record sound and some other sound regarding issues, i came across:
https://bdsc.webapps.blackberry.com/native/referen
so i was interested in the last part of hte documention:
"You can list the devices that are on your system by typing:
ls /dev/snd"
i investigated this point and here is the output:
$ ls -la /dev/snd total 0 -rw-rw-rw- 1 root nto 0 Jan 04 12:27 controlC0 -rw-rw-rw- 1 root nto 0 Jan 03 18:16 mixerC0D0 -rw-rw-rw- 1 root nto 0 Jan 04 11:09 pcmC0D0c -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D0p -rw-rw-rw- 1 root nto 0 Jan 03 18:17 pcmC0D1p -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D2p -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D3p -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D4c -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D5c -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D5p -rw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmC0D6c lrw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmPreferredc -> pcmC0D0c lrw-rw-rw- 1 root nto 0 Jan 04 12:27 pcmPreferredp -> pcmC0D1p
an image in the docu show pcmC0D0p as some kind of "standard" pcm, but the preferred is linked to pcmC0D1p.
does anybody know why ?
Solved! Go to Solution.
01-10-2012 11:17 AM
Hi,
The diagram in the linked site is just a generic diagram of audio devices and does not reflect the preferred PCM. To determine the preferred PCM you have a few options:
Synchronously - use
audiodevice_get()
Asynchronously - call
audiodevice_request_events()
Before your BPS loop then check for audio change events using
audiodevice_event_get_path()
Regards,
01-12-2012 03:20 AM
thx for the clarification