1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/*
* drv_alsaplayer.c
* Copyright (C) 1999 Paul N. Fisher <rao@gnu.org>
*
* This file is part of AlsaPlayer.
*
* AlsaPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* AlsaPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
#include "mikmod.h"
static BOOL alsaplayer_Init (void)
{
return VC_Init ();
}
static void alsaplayer_Exit (void)
{
VC_Exit();
}
static void alsaplayer_Update (void)
{
/*
No need to use this extra level of indirection;
we handle all audio_buffer updating in mikmod_play_block ()
*/
}
static BOOL alsaplayer_IsThere (void)
{
return 1;
}
MDRIVER drv_alsaplayer =
{
NULL,
"AlsaPlayer",
"AlsaPlayer Output Driver v1.0",
0, 255,
"alsaplayer",
#if (LIBMIKMOD_VERSION >= 0x030200)
"",
#endif
NULL,
alsaplayer_IsThere,
VC_SampleLoad,
VC_SampleUnload,
VC_SampleSpace,
VC_SampleLength,
alsaplayer_Init,
alsaplayer_Exit,
NULL,
VC_SetNumVoices,
VC_PlayStart,
VC_PlayStop,
alsaplayer_Update,
NULL,
VC_VoiceSetVolume,
VC_VoiceGetVolume,
VC_VoiceSetFrequency,
VC_VoiceGetFrequency,
VC_VoiceSetPanning,
VC_VoiceGetPanning,
VC_VoicePlay,
VC_VoiceStop,
VC_VoiceStopped,
VC_VoiceGetPosition,
VC_VoiceRealVolume
};
|