📄 stream.inc
字号:
{* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
* /\____/
* \_/__/
*
* Streaming sound routines.
*
* By Shawn Hargreaves.
*
* See readme.txt for copyright information.
*}
{$IFDEF ALLEGRO_INTERFACE}
type
P_AUDIOSTREAM = ^AUDIOSTREAM;
AUDIOSTREAM = record
voice : sint32; // the voice we are playing on
sampe : P_SAMPLE; // the sample we are using
len : sint32; // buffer length
bufcount : sint32; // number of buffers per sample half
bufnum : sint32; // current refill buffer
active : sint32; // which half is currently playing
locked : Pointer; // the locked buffer
end;
var
play_audio_stream: function(len, bits: sint32; stereo: Boolean; freq, vol, pan: sint32): P_AUDIOSTREAM; cdecl;
stop_audio_stream: procedure(stream: P_AUDIOSTREAM); cdecl;
get_audio_stream_buffer: function(stream: P_AUDIOSTREAM): Pointer; cdecl;
free_audio_stream_buffer: procedure(stream: P_AUDIOSTREAM); cdecl;
{$ENDIF ALLEGRO_INTERFACE}
{$IFDEF ALLEGRO_IMPLEMENTATION}
{$ENDIF ALLEGRO_IMPLEMENTATION}
{$IFDEF ALLEGRO_LOADVARIABLE}
play_audio_stream := LoadDLL('play_audio_stream');
stop_audio_stream := LoadDLL('stop_audio_stream');
get_audio_stream_buffer := LoadDLL('get_audio_stream_buffer');
free_audio_stream_buffer := LoadDLL('free_audio_stream_buffer');
{$ENDIF ALLEGRO_LOADVARIABLE}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -