File: Snd.cxx

package info (click to toggle)
stella 0.7-2
  • links: PTS
  • area: non-free
  • in suites: hamm, slink
  • size: 864 kB
  • ctags: 1,158
  • sloc: cpp: 6,615; ansic: 492; makefile: 224; asm: 31
file content (78 lines) | stat: -rw-r--r-- 2,369 bytes parent folder | download
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
//============================================================================
//
//    SSSS    tt          lll  lll              
//   SS  SS   tt           ll   ll                
//   SS     tttttt  eeee   ll   ll   aaaa    "An Atari 2600 VCS Emulator"
//    SSSS    tt   ee  ee  ll   ll      aa      
//       SS   tt   eeeeee  ll   ll   aaaaa   Copyright (c) 1995,1996,1997
//   SS  SS   tt   ee      ll   ll  aa  aa         Bradford W. Mott
//    SSSS     ttt  eeeee llll llll  aaaaa    
//
//============================================================================

/**
  Base class that defines the standard API for sound classes.  You
  should derive a new class from this one to create a new sound system.

  @author  Bradford W. Mott
  @version $Id: Snd.cxx,v 1.3 1997/05/31 14:01:37 bwmott Exp $
*/

#include "Snd.hxx"

#if defined UNIX_OS
  #include "SndUnix.hxx"
#elif defined MSDOS_OS
  #include "SndDOS.hxx"
#elif defined WIN32
  #include "SndWin32.h"
#elif defined MAC_OS
  #include "SndMac.hxx"
#elif defined OS_2
  #include "SndOS2.hxx"
#endif

//============================================================================
// Class methods which answers the "best" sound object
// for the system we're running on
//============================================================================
Sound* Sound::create()
{
  #if defined UNIX_OS
    return new SoundUnix;
  #elif defined MSDOS_OS
    return new SoundDOS;
  #elif defined WIN32
    return new SoundWin32;
  #elif defined MAC_OS
    return new SoundMac;
  #elif defined OS_2
    return new SoundOS2;
  #else
    return new Sound;
  #endif
}

//============================================================================
// Constructor
//============================================================================
Sound::Sound()
{
}
 
//============================================================================
// Destructor
//============================================================================
Sound::~Sound()
{
}

//============================================================================
// Set the given sound register to the specified value
//============================================================================
void Sound::set(Sound::Register, uByte)
{
  // For the "default" sound class we don't do anything since we're
  // not trying to handle sound
}