|  |  
 |   |   
 NAMEal_create_audio_stream - Allegro 5 API SYNOPSIS
 DESCRIPTIONCreates an ALLEGRO_AUDIO_STREAM(3). The stream will be set to play by default. It will feed audio data from a buffer, which is split into a number of fragments. Parameters: 
 A sample that is referred to by the frag_samples parameter refers to a sequence channel intensities. E.g. if you’re making a stereo stream with the frag_samples set to 4, then the layout of the data in the fragment will be: 
 Where L and R are the intensities for the left and right channels respectively. A single sample, then, refers to the LR pair in this example. The choice of fragment_count, frag_samples and freq directly influences the audio delay. The delay in seconds can be expressed as: 
 This is only the delay due to Allegro’s streaming, there may be additional delay caused by sound drivers and/or hardware. Note: If you know the fragment size in bytes, you can get the size in samples like this: 
 The size of the complete buffer is: 
 Note: Unlike many Allegro objects, audio streams are not implicitly destroyed when Allegro is shut down. You must destroy them manually with al_destroy_audio_stream(3) before the audio system is shut down. 
 
 |