Hello.
I need to set proper period time for my application. What I need my code to do is to play sine wave with set frequency and for exact time of 1/1200 s (something about 834 us). When I try to set period time for 834 us I've got this error: Unable to set period time 834 for playback: Invalid argument . Honestly speaking I've got this error message no matter what value I try to set). The same situation take place when I try to set buffer time for something about 1000us (so one period could fit in my buffer).
The purpose of this program is to generate sine wave for AFSK (audio frequency-shift keying). I want to play wave for period_time (834us) then if needed change frequency and play changed wave again for period_time with phase shifting.
Wave generation with phase shifting for variable frequencies works, but not with period_time I need.
Could anyone look at source and tell me why I can't set this values?
I placed code with syntax highlighting at: http://pygments.org/demo/606/ . (Don't look at prepare_message function, it isn't used right now).
Thanks from advice.
Ignacy.