<div>Hi experts</div><div><br />I have some more beginner questions about jack API.</div><div>Long time ago i writed lil test program - sine signal generator with OSS output and TUI level indicators.</div><div>http://martini.pudele.com/radio/demos/sin_gen-01.c</div><div>It is possible with (curses-ansi escapes) TUI vary sine parameters - Frequency and amplitude.</div><div> </div><div>Program is so structured :</div><div> </div><div>int  main ( int argc, char *argv[] ) </div><div>{</div><div>  open_sound_device();</div><div>    for(;;)</div><div>    { </div><div>        // calc sine wave here</div><div>        status = write(audio_fd,audio_buffer,BUFFA_SIZE*2);</div><div> </div><div>    } // for;;</div><div> </div><div>  close_sound_device();</div><div>} // main</div><div> </div><div>Is it possible this program __as_is__ rewrite for jack output ?</div><div>Sine values do no multiple with 32767.0 <br />and instead of</div><div>  open_sound_device();</div><div>  write(audio_fd,audio_buffer,BUFFA_SIZE*2);</div><div>  close_sound_device();</div><div>just call jack stuff ?</div><div> </div><div>====</div><div> </div><div>Anyway - What is best (thread?, IPC?) program, structure, realtime-safe,</div><div>for such simple jack-TUI program ?</div><div> </div><div>====</div><div> </div><div>Normal 16 bit sound samples must be in range</div><div>-0x8000 ... +0xFFFF  or dec  -32768 ... +32767 signed short</div><div>but jack server works with samples normalized -1.0 ... +1.0 float</div><div> </div><div>(1/32768) x 32767 = 0.999969482</div><div> </div><div>Must be jack final output samples clipped in range</div><div>-1.0 ... +0.999969482  ?</div><div>If not, does jack clip anything to -1.0 and +0.999969482 ?</div><div> </div><div id="sig_lower"><br />Tnx in advace @ all<br />Alfs Kurmis<br /><br /><br /><br /><br /><br /><br />----</div>