Beispiel #1
0
long audriv_play_stop(void)
/* 演奏を即座に停止し,停止直前のサンプル数を返します.
 * audriv_play_stop() の呼び出しによって,audio は閉じます.
 * audio が既に閉じている場合に audriv_play_stop() を呼び出した場合は 0 を
 * 返します.
 * エラーの場合は -1 を返します.
 */
{
    long n;

    n = audriv_play_samples();
    play_open_flag = False;
    return n;
}
Beispiel #2
0
long audriv_play_stop(void)
/* 演奏を即座に停止し,停止直前のサンプル数を返します.
 * audriv_play_stop() の呼び出しによって,audio は閉じます.
 * audio が既に閉じている場合に audriv_play_stop() を呼び出した場合は 0 を
 * 返します.
 * エラーの場合は -1 を返します.
 */
{
    long samp;

    if(!out)
	return 0;
    samp = audriv_play_samples();
    alClosePort(out);
    reset_samples = play_counter = 0;
    out = NULL;
    return samp;
}
Beispiel #3
0
static void add_sample_counter(int32 count)
{
    audriv_play_samples(); /* update offset_samples */
    play_counter += count;
}