NalfusLe 19/10/2014 à 09:01
http://toshyp.atari.org/en/004011.html
/* Test and lock sound systeme */
if( Locksnd()==1 )
{
/* Set playback(0) buffer */
Setbuffer ( 0, adr_buffer+128, adr_buffer+taille_fichier );
/* fichier AVR, le sample commence à +128 */
/* sample 8 bit stéréo */
Setmode( 0 );
/* src=DMA, dest=D/A, scrclock=25.175Mhz, prescale=25khz, protocol=1 */
Devconnect( 0, 8, 0, 3, 1);
/* DMA sound playback sans loop */
Buffoper ( 1 );
/* le son démarre */
Sound_play=TRUE;
}
/* le programme continue sa route ... */
evnt_timer(2000);
if( Sound_play==TRUE )
{
Sound_play=FALSE;
/* Stop DMA sound playback */
Buffoper ( 0 );
/* Unlock sound systeme */
Unlocksnd();
}