~ubuntu-branches/ubuntu/karmic/frozen-bubble/karmic

« back to all changes in this revision

Viewing changes to SDL_mixer_patched/mikmod/drv_nos.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2004-07-08 17:22:16 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040708172216-4e9erxuhsq7djmnd
Tags: 1.0.0-6
c_stuff/lib/FBLE.pm: fix to deal with new SDL_perl (closes: #257749).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*      MikMod sound library
2
 
        (c) 1998, 1999, 2000 Miodrag Vallat and others - see file AUTHORS for
3
 
        complete list.
4
 
 
5
 
        This library is free software; you can redistribute it and/or modify
6
 
        it under the terms of the GNU Library General Public License as
7
 
        published by the Free Software Foundation; either version 2 of
8
 
        the License, or (at your option) any later version.
9
 
 
10
 
        This program is distributed in the hope that it will be useful,
11
 
        but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
        GNU Library General Public License for more details.
14
 
 
15
 
        You should have received a copy of the GNU Library General Public
16
 
        License along with this library; if not, write to the Free Software
17
 
        Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18
 
        02111-1307, USA.
19
 
*/
20
 
 
21
 
/*==============================================================================
22
 
 
23
 
  $Id: drv_nos.c,v 1.4 2001/09/11 18:49:18 slouken Exp $
24
 
 
25
 
  Driver for no output
26
 
 
27
 
==============================================================================*/
28
 
 
29
 
/*
30
 
 
31
 
        Written by Jean-Paul Mikkers <mikmak@via.nl>
32
 
 
33
 
*/
34
 
 
35
 
#ifdef HAVE_CONFIG_H
36
 
#include "config.h"
37
 
#endif
38
 
 
39
 
#ifdef HAVE_UNISTD_H
40
 
#include <unistd.h>
41
 
#endif
42
 
 
43
 
#include "mikmod_internals.h"
44
 
 
45
 
#define ZEROLEN 32768
46
 
 
47
 
static  SBYTE *zerobuf=NULL;
48
 
 
49
 
static BOOL NS_IsThere(void)
50
 
{
51
 
        return 1;
52
 
}
53
 
 
54
 
static BOOL NS_Init(void)
55
 
{
56
 
        zerobuf=(SBYTE*)_mm_malloc(ZEROLEN);
57
 
        return VC_Init();
58
 
}
59
 
 
60
 
static void NS_Exit(void)
61
 
{
62
 
        VC_Exit();
63
 
        _mm_free(zerobuf);
64
 
}
65
 
 
66
 
static void NS_Update(void)
67
 
{
68
 
        if (zerobuf)
69
 
                VC_WriteBytes(zerobuf,ZEROLEN);
70
 
}
71
 
 
72
 
MIKMODAPI MDRIVER drv_nos={
73
 
        NULL,
74
 
        "No Sound",
75
 
        "Nosound Driver v3.0",
76
 
        255,255,
77
 
        "nosound",
78
 
 
79
 
        NULL,
80
 
        NS_IsThere,
81
 
        VC_SampleLoad,
82
 
        VC_SampleUnload,
83
 
        VC_SampleSpace,
84
 
        VC_SampleLength,
85
 
        NS_Init,
86
 
        NS_Exit,
87
 
        NULL,
88
 
        VC_SetNumVoices,
89
 
        VC_PlayStart,
90
 
        VC_PlayStop,
91
 
        NS_Update,
92
 
        NULL,
93
 
        VC_VoiceSetVolume,
94
 
        VC_VoiceGetVolume,
95
 
        VC_VoiceSetFrequency,
96
 
        VC_VoiceGetFrequency,
97
 
        VC_VoiceSetPanning,
98
 
        VC_VoiceGetPanning,
99
 
        VC_VoicePlay,
100
 
        VC_VoiceStop,
101
 
        VC_VoiceStopped,
102
 
        VC_VoiceGetPosition,
103
 
        VC_VoiceRealVolume
104
 
};
105
 
 
106
 
 
107
 
/* ex:set ts=4: */