THIS PAGE CONTAINS A COUPLE OF WORKING AUDIO DEMOS, TECHNICAL WAVE DETAILS AND FURTHER ALSA INTIALISATION DETAILS.
===============================================
Threads continue:
Code:
/* CAUSES SEGGIE
*
if ((err = snd_pcm_hw_params_set_rate_near
(capture_handle, hw_params, 48000, 0)) < 0) {
fprintf (stderr, "cannot set sample rate (%s)\n",
snd_strerror (err));
exit (1);
}
*/
so either approximate yourself or go for the known hw rates [re-Listed here from previous post]
Device: hw (type: HW)
Access types: MMAP_INTERLEAVED RW_INTERLEAVED
Formats: S16_LE S24_LE S20_3LE
Channels: 2
Sample rates:
8000 11025 16000 22050 32000 44100 48000
Interrupt interval: 166-512000 us
Buffer size: 333-2048000 us
Making the right choices should be trivial since we have known hardware
(This assumes that all kindles with sound support will support the same alsa rates,
This is untested on anything but a 3.)
Instead use
snd_pcm_hw_params_set_rate
For example
Code:
if ((err = snd_pcm_hw_params_set_rate
(capture_handle, hw_params, 48000, 0)) < 0) {
fprintf (stderr, "cannot set sample rate (%s)\n",
snd_strerror (err));
exit (1);
}
should be fine