BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Properties | List of all members
BrawlLib.Internal.Audio.AudioProvider Class Referenceabstract
Inheritance diagram for BrawlLib.Internal.Audio.AudioProvider:

Public Types

enum  AudioProviderType
 

Public Member Functions

virtual void Dispose ()
 
abstract void Attach (Control owner)
 
abstract AudioBuffer CreateBuffer (IAudioStream target)
 

Static Public Member Functions

static AudioProvider Create (AudioDevice device)
 

Static Public Attributes

static AudioProviderType AvailableTypes = AudioProviderType.All
 

Properties

AudioDevice Device [get]
 
List< AudioBufferBuffers [get]
 

Member Enumeration Documentation

◆ AudioProviderType

17 {
18 None = 0,
19 DirectSound = 1,
20 OpenAL = 2,
21 All = ~0
22 };

Member Function Documentation

◆ Attach()

abstract void BrawlLib.Internal.Audio.AudioProvider.Attach ( Control  owner)
pure virtual

◆ Create()

static AudioProvider BrawlLib.Internal.Audio.AudioProvider.Create ( AudioDevice  device)
inlinestatic
27 {
28 if (AvailableTypes.HasFlag(AudioProviderType.DirectSound))
29 {
30 switch (Environment.OSVersion.Platform)
31 {
32 case PlatformID.Win32NT:
33 if (IntPtr.Size <= 4)
34 {
35 return new wAudioProvider(device);
36 }
37
38 break;
39 }
40 }
41
42 if (device == null && AvailableTypes.HasFlag(AudioProviderType.OpenAL))
43 {
44 try
45 {
46 return new alAudioProvider();
47 }
48 catch (TypeInitializationException)
49 {
50 }
51 }
52
53 return null;
54 }
AudioProviderType
Definition: AudioProvider.cs:17
static AudioProviderType AvailableTypes
Definition: AudioProvider.cs:24

◆ CreateBuffer()

abstract AudioBuffer BrawlLib.Internal.Audio.AudioProvider.CreateBuffer ( IAudioStream  target)
pure virtual

◆ Dispose()

virtual void BrawlLib.Internal.Audio.AudioProvider.Dispose ( )
inlinevirtual
62 {
63 foreach (AudioBuffer buffer in _buffers)
64 {
65 buffer.Dispose();
66 }
67
68 _buffers.Clear();
69 GC.SuppressFinalize(this);
70 }

Member Data Documentation

◆ AvailableTypes

AudioProviderType BrawlLib.Internal.Audio.AudioProvider.AvailableTypes = AudioProviderType.All
static

Property Documentation

◆ Buffers

List<AudioBuffer> BrawlLib.Internal.Audio.AudioProvider.Buffers
get

◆ Device

AudioDevice BrawlLib.Internal.Audio.AudioProvider.Device
get

The documentation for this class was generated from the following file: