Re: Problem with setting period time and buffer time.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ignacy Kasperowicz wrote:>> Just write the data to the device.>> Ok, but when I just write data to the device I don't really know how> long it'll be playing.
But you know how many sample you are writing, and you know the samplerate.
> There is no problem when I've infinite loop with writei inside. but I> need to change freq of my sound signal with exact 843 us period time.
Assuming a sample rate of 48 kHz, 1/1200 s corresponds to exactly40 samples.  At 44.1 kHz, this would be 36.75 samples, so you'd have touse groups of 37+37+37+36 samples with appropriate phase shifting.
BTW: 1 / 1200 Hz = 833.33... µs

HTHClemens_______________________________________________Alsa-devel mailing listAlsa-devel@xxxxxxxxxxxxxxxxxxxx://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux