beeps 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.doc/ext/beeps/analyser.cpp +1 -1
  3. data/.doc/ext/beeps/{adsr.cpp → envelope.cpp} +20 -20
  4. data/.doc/ext/beeps/file_in.cpp +1 -1
  5. data/.doc/ext/beeps/gain.cpp +1 -1
  6. data/.doc/ext/beeps/mic_in.cpp +1 -1
  7. data/.doc/ext/beeps/native.cpp +4 -2
  8. data/.doc/ext/beeps/oscillator.cpp +1 -1
  9. data/.doc/ext/beeps/pitch_shift.cpp +1 -1
  10. data/.doc/ext/beeps/processor.cpp +1 -1
  11. data/.doc/ext/beeps/sequencer.cpp +87 -0
  12. data/.doc/ext/beeps/sound.cpp +1 -1
  13. data/.doc/ext/beeps/sound_player.cpp +1 -1
  14. data/.doc/ext/beeps/time_stretch.cpp +1 -1
  15. data/.github/workflows/release-gem.yml +1 -1
  16. data/.github/workflows/test.yml +3 -0
  17. data/ChangeLog.md +13 -0
  18. data/Gemfile.lock +1 -1
  19. data/LICENSE +21 -0
  20. data/Rakefile +3 -2
  21. data/VERSION +1 -1
  22. data/beeps.gemspec +2 -2
  23. data/ext/beeps/analyser.cpp +1 -1
  24. data/ext/beeps/defs.h +2 -0
  25. data/ext/beeps/{adsr.cpp → envelope.cpp} +20 -20
  26. data/ext/beeps/extconf.rb +11 -3
  27. data/ext/beeps/file_in.cpp +1 -1
  28. data/ext/beeps/gain.cpp +1 -1
  29. data/ext/beeps/mic_in.cpp +1 -1
  30. data/ext/beeps/native.cpp +4 -2
  31. data/ext/beeps/oscillator.cpp +1 -1
  32. data/ext/beeps/pitch_shift.cpp +1 -1
  33. data/ext/beeps/processor.cpp +1 -1
  34. data/ext/beeps/sequencer.cpp +92 -0
  35. data/ext/beeps/sound.cpp +1 -1
  36. data/ext/beeps/sound_player.cpp +1 -1
  37. data/ext/beeps/time_stretch.cpp +1 -1
  38. data/include/beeps/defs.h +7 -0
  39. data/include/beeps/filter.h +4 -4
  40. data/include/beeps/generator.h +31 -0
  41. data/include/beeps/ruby/beeps.h +1 -1
  42. data/include/beeps/ruby/exception.h +2 -2
  43. data/include/beeps/ruby/filter.h +16 -10
  44. data/include/beeps/ruby/generator.h +18 -5
  45. data/include/beeps/ruby/processor.h +2 -2
  46. data/include/beeps/ruby/sound.h +4 -4
  47. data/lib/beeps/extension.rb +4 -0
  48. data/lib/beeps/processor.rb +2 -2
  49. data/src/beeps.cpp +3 -1
  50. data/src/beeps.h +22 -0
  51. data/src/{adsr.cpp → envelope.cpp} +21 -20
  52. data/src/openal.cpp +3 -1
  53. data/src/oscillator.cpp +75 -44
  54. data/src/osx/beeps.mm +19 -0
  55. data/src/processor.cpp +59 -49
  56. data/src/processor.h +30 -14
  57. data/src/sequencer.cpp +160 -0
  58. data/src/signals.cpp +45 -29
  59. data/src/signals.h +4 -4
  60. data/src/sound.cpp +32 -29
  61. data/src/win32/beeps.cpp +36 -0
  62. data/src/win32/exception.cpp +40 -0
  63. data/src/win32/exception.h +40 -0
  64. data/src/win32/signals.cpp +186 -0
  65. metadata +21 -10
@@ -0,0 +1,92 @@
1
+ #include "beeps/ruby/generator.h"
2
+
3
+
4
+ #include "beeps/ruby/processor.h"
5
+ #include "defs.h"
6
+
7
+
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sequencer)
9
+
10
+ #define THIS to<Beeps::Sequencer*>(self)
11
+
12
+ #define CHECK RUCY_CHECK_OBJ(Beeps::Sequencer, self)
13
+
14
+
15
+ static
16
+ RUCY_DEF_ALLOC(alloc, klass)
17
+ {
18
+ return value(new Beeps::RubyProcessor<Beeps::Sequencer>, klass);
19
+ }
20
+ RUCY_END
21
+
22
+ static
23
+ RUCY_DEF3(add, processor, offset, duration)
24
+ {
25
+ CHECK;
26
+
27
+ THIS->add(
28
+ to<Beeps::Processor*>(processor),
29
+ to<float>(offset),
30
+ to<float>(duration));
31
+ }
32
+ RUCY_END
33
+
34
+ static
35
+ RUCY_DEF2(remove, processor, offset)
36
+ {
37
+ CHECK;
38
+
39
+ THIS->remove(
40
+ to<Beeps::Processor*>(processor),
41
+ to<float>(offset));
42
+ }
43
+ RUCY_END
44
+
45
+ static
46
+ RUCY_DEF1(set_time_scale, time_scale)
47
+ {
48
+ CHECK;
49
+
50
+ THIS->set_time_scale(to<float>(time_scale));
51
+ return time_scale;
52
+ }
53
+ RUCY_END
54
+
55
+ static
56
+ RUCY_DEF0(get_time_scale)
57
+ {
58
+ CHECK;
59
+
60
+ return value(THIS->time_scale());
61
+ }
62
+ RUCY_END
63
+
64
+
65
+ static Class cSequencer;
66
+
67
+ void
68
+ Init_beeps_sequencer ()
69
+ {
70
+ Module mBeeps = define_module("Beeps");
71
+
72
+ cSequencer = mBeeps.define_class("Sequencer", Beeps::processor_class());
73
+ cSequencer.define_alloc_func(alloc);
74
+ cSequencer.define_method("add", add);
75
+ cSequencer.define_method("remove", remove);
76
+ //cSequencer.define_method("time_scale=", set_time_scale);
77
+ //cSequencer.define_method("time_scale", get_time_scale);
78
+ }
79
+
80
+
81
+ namespace Beeps
82
+ {
83
+
84
+
85
+ Class
86
+ sequencer_class ()
87
+ {
88
+ return cSequencer;
89
+ }
90
+
91
+
92
+ }// Beeps
data/ext/beeps/sound.cpp CHANGED
@@ -4,7 +4,7 @@
4
4
  #include "defs.h"
5
5
 
6
6
 
7
- RUCY_DEFINE_VALUE_FROM_TO(Beeps::Sound)
7
+ RUCY_DEFINE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sound)
8
8
 
9
9
  #define THIS to<Beeps::Sound*>(self)
10
10
 
@@ -4,7 +4,7 @@
4
4
  #include "defs.h"
5
5
 
6
6
 
7
- RUCY_DEFINE_VALUE_FROM_TO(Beeps::SoundPlayer)
7
+ RUCY_DEFINE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::SoundPlayer)
8
8
 
9
9
  #define THIS to<Beeps::SoundPlayer*>(self)
10
10
 
@@ -5,7 +5,7 @@
5
5
  #include "defs.h"
6
6
 
7
7
 
8
- RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(Beeps::TimeStretch)
8
+ RUCY_DEFINE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::TimeStretch)
9
9
 
10
10
  #define THIS to<Beeps::TimeStretch*>(self)
11
11
 
data/include/beeps/defs.h CHANGED
@@ -8,6 +8,13 @@
8
8
  #include <xot/string.h>
9
9
 
10
10
 
11
+ #if defined(WIN32) && defined(GCC) && defined(BEEPS)
12
+ #define BEEPS_EXPORT __declspec(dllexport)
13
+ #else
14
+ #define BEEPS_EXPORT
15
+ #endif
16
+
17
+
11
18
  namespace Beeps
12
19
  {
13
20
 
@@ -37,16 +37,16 @@ namespace Beeps
37
37
  };// Gain
38
38
 
39
39
 
40
- class ADSR : public Filter
40
+ class Envelope : public Filter
41
41
  {
42
42
 
43
43
  typedef Filter Super;
44
44
 
45
45
  public:
46
46
 
47
- ADSR (Processor* input = NULL);
47
+ Envelope (Processor* input = NULL);
48
48
 
49
- virtual ~ADSR ();
49
+ virtual ~Envelope ();
50
50
 
51
51
  virtual void note_on (float delay = 0);
52
52
 
@@ -77,7 +77,7 @@ namespace Beeps
77
77
 
78
78
  Xot::PImpl<Data> self;
79
79
 
80
- };// ADSR
80
+ };// Envelope
81
81
 
82
82
 
83
83
  class TimeStretch : public Filter
@@ -46,6 +46,37 @@ namespace Beeps
46
46
  };// Oscillator
47
47
 
48
48
 
49
+ class Sequencer : public Generator
50
+ {
51
+
52
+ typedef Generator Super;
53
+
54
+ public:
55
+
56
+ Sequencer ();
57
+
58
+ virtual ~Sequencer ();
59
+
60
+ virtual void add (Processor* processor, float offset, float duration);
61
+
62
+ virtual void remove (Processor* processor, float offset);
63
+
64
+ virtual void set_time_scale (float scale);
65
+
66
+ virtual float time_scale () const;
67
+
68
+ virtual void generate (
69
+ Context* context, Signals* signals, uint* offset) override;
70
+
71
+ virtual operator bool () const override;
72
+
73
+ struct Data;
74
+
75
+ Xot::PImpl<Data> self;
76
+
77
+ };// Sequencer
78
+
79
+
49
80
  class FileIn : public Generator
50
81
  {
51
82
 
@@ -12,7 +12,7 @@ namespace Beeps
12
12
  {
13
13
 
14
14
 
15
- Rucy::Module beeps_module ();
15
+ BEEPS_EXPORT Rucy::Module beeps_module ();
16
16
  // module Beeps
17
17
 
18
18
 
@@ -12,10 +12,10 @@ namespace Beeps
12
12
  {
13
13
 
14
14
 
15
- Rucy::Class beeps_error_class ();
15
+ BEEPS_EXPORT Rucy::Class beeps_error_class ();
16
16
  // class Beeps::BeepsError
17
17
 
18
- Rucy::Class openal_error_class ();
18
+ BEEPS_EXPORT Rucy::Class openal_error_class ();
19
19
  // class Beeps::OpenALError
20
20
 
21
21
 
@@ -9,28 +9,34 @@
9
9
  #include <beeps/filter.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::TimeStretch)
12
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Gain)
13
13
 
14
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::PitchShift)
14
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Envelope)
15
+
16
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::TimeStretch)
17
+
18
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::PitchShift)
19
+
20
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Analyser)
15
21
 
16
22
 
17
23
  namespace Beeps
18
24
  {
19
25
 
20
26
 
21
- Rucy::Class gain_class ();
27
+ BEEPS_EXPORT Rucy::Class gain_class ();
22
28
  // class Beeps::Gain
23
29
 
24
- Rucy::Class adsr_class ();
25
- // class Beeps::ADSR
30
+ BEEPS_EXPORT Rucy::Class envelope_class ();
31
+ // class Beeps::Envelope
26
32
 
27
- Rucy::Class time_stretch_class ();
33
+ BEEPS_EXPORT Rucy::Class time_stretch_class ();
28
34
  // class Beeps::TimeStretch
29
35
 
30
- Rucy::Class pitch_shift_class ();
36
+ BEEPS_EXPORT Rucy::Class pitch_shift_class ();
31
37
  // class Beeps::PitchShift
32
38
 
33
- Rucy::Class analyser_class ();
39
+ BEEPS_EXPORT Rucy::Class analyser_class ();
34
40
  // class Beeps::Analyser
35
41
 
36
42
 
@@ -48,9 +54,9 @@ namespace Rucy
48
54
  }
49
55
 
50
56
  template <> inline Class
51
- get_ruby_class<Beeps::ADSR> ()
57
+ get_ruby_class<Beeps::Envelope> ()
52
58
  {
53
- return Beeps::adsr_class();
59
+ return Beeps::envelope_class();
54
60
  }
55
61
 
56
62
  template <> inline Class
@@ -9,22 +9,29 @@
9
9
  #include <beeps/generator.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::Oscillator)
12
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Oscillator)
13
13
 
14
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::FileIn)
14
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sequencer)
15
+
16
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::FileIn)
17
+
18
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::MicIn)
15
19
 
16
20
 
17
21
  namespace Beeps
18
22
  {
19
23
 
20
24
 
21
- Rucy::Class oscillator_class ();
25
+ BEEPS_EXPORT Rucy::Class oscillator_class ();
22
26
  // class Beeps::Oscillator
23
27
 
24
- Rucy::Class file_in_class ();
28
+ BEEPS_EXPORT Rucy::Class sequencer_class ();
29
+ // class Beeps::Sequencer
30
+
31
+ BEEPS_EXPORT Rucy::Class file_in_class ();
25
32
  // class Beeps::FileIn
26
33
 
27
- Rucy::Class mic_in_class ();
34
+ BEEPS_EXPORT Rucy::Class mic_in_class ();
28
35
  // class Beeps::MicIn
29
36
 
30
37
 
@@ -41,6 +48,12 @@ namespace Rucy
41
48
  return Beeps::oscillator_class();
42
49
  }
43
50
 
51
+ template <> inline Class
52
+ get_ruby_class<Beeps::Sequencer> ()
53
+ {
54
+ return Beeps::sequencer_class();
55
+ }
56
+
44
57
  template <> inline Class
45
58
  get_ruby_class<Beeps::FileIn> ()
46
59
  {
@@ -9,14 +9,14 @@
9
9
  #include <beeps/processor.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(Beeps::Processor)
12
+ RUCY_DECLARE_WRAPPER_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Processor)
13
13
 
14
14
 
15
15
  namespace Beeps
16
16
  {
17
17
 
18
18
 
19
- Rucy::Class processor_class ();
19
+ BEEPS_EXPORT Rucy::Class processor_class ();
20
20
  // class Beeps::Processor
21
21
 
22
22
 
@@ -9,19 +9,19 @@
9
9
  #include <beeps/sound.h>
10
10
 
11
11
 
12
- RUCY_DECLARE_VALUE_FROM_TO(Beeps::SoundPlayer)
12
+ RUCY_DECLARE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::SoundPlayer)
13
13
 
14
- RUCY_DECLARE_VALUE_FROM_TO(Beeps::Sound)
14
+ RUCY_DECLARE_VALUE_FROM_TO(BEEPS_EXPORT, Beeps::Sound)
15
15
 
16
16
 
17
17
  namespace Beeps
18
18
  {
19
19
 
20
20
 
21
- Rucy::Class sound_player_class ();
21
+ BEEPS_EXPORT Rucy::Class sound_player_class ();
22
22
  // class Beeps::SoundPlayer
23
23
 
24
- Rucy::Class sound_class ();
24
+ BEEPS_EXPORT Rucy::Class sound_class ();
25
25
  // class Beeps::Sound
26
26
 
27
27
 
@@ -25,6 +25,10 @@ module Beeps
25
25
  root_dir 'lib'
26
26
  end
27
27
 
28
+ def ext_dir()
29
+ root_dir 'ext'
30
+ end
31
+
28
32
  end# Extension
29
33
 
30
34
 
@@ -75,7 +75,7 @@ module Beeps
75
75
  end# Gain
76
76
 
77
77
 
78
- class ADSR
78
+ class Envelope
79
79
 
80
80
  def note_on(delay = 0)
81
81
  note_on! delay
@@ -96,7 +96,7 @@ module Beeps
96
96
  alias release= release_time=
97
97
  alias release release_time
98
98
 
99
- end# ADSR
99
+ end# Envelope
100
100
 
101
101
 
102
102
  class TimeStretch
data/src/beeps.cpp CHANGED
@@ -1,5 +1,5 @@
1
1
  // -*- objc -*-
2
- #include "beeps/beeps.h"
2
+ #include "beeps.h"
3
3
 
4
4
 
5
5
  #include "Stk.h"
@@ -16,6 +16,7 @@ namespace Beeps
16
16
  void
17
17
  init ()
18
18
  {
19
+ Beeps_init();
19
20
  OpenAL_init();
20
21
 
21
22
  stk::Stk::setSampleRate(44100);
@@ -28,6 +29,7 @@ namespace Beeps
28
29
  SoundPlayer_clear_streams();
29
30
 
30
31
  OpenAL_fin();
32
+ Beeps_fin();
31
33
  }
32
34
 
33
35
  void
data/src/beeps.h ADDED
@@ -0,0 +1,22 @@
1
+ // -*- c++ -*-
2
+ #pragma once
3
+ #ifndef __BEEPS_SRC_BEEPS_H__
4
+ #define __BEEPS_SRC_BEEPS_H__
5
+
6
+
7
+ #include "beeps/beeps.h"
8
+
9
+
10
+ namespace Beeps
11
+ {
12
+
13
+
14
+ void Beeps_init ();
15
+
16
+ void Beeps_fin ();
17
+
18
+
19
+ }// Beeps
20
+
21
+
22
+ #endif//EOH
@@ -3,6 +3,7 @@
3
3
 
4
4
  #include <assert.h>
5
5
  #include <ADSR.h>
6
+ #include "beeps/debug.h"
6
7
  #include "signals.h"
7
8
 
8
9
 
@@ -10,7 +11,7 @@ namespace Beeps
10
11
  {
11
12
 
12
13
 
13
- struct ADSR::Data
14
+ struct Envelope::Data
14
15
  {
15
16
 
16
17
  stk::ADSR adsr;
@@ -29,21 +30,21 @@ namespace Beeps
29
30
  adsr.setReleaseTime( release_time == 0 ? 0.01 : release_time);
30
31
  }
31
32
 
32
- };// ADSR::Data
33
+ };// Envelope::Data
33
34
 
34
35
 
35
- ADSR::ADSR (Processor* input)
36
+ Envelope::Envelope (Processor* input)
36
37
  : Super(input)
37
38
  {
38
39
  self->update_envelope();
39
40
  }
40
41
 
41
- ADSR::~ADSR ()
42
+ Envelope::~Envelope ()
42
43
  {
43
44
  }
44
45
 
45
46
  void
46
- ADSR::note_on (float delay)
47
+ Envelope::note_on (float delay)
47
48
  {
48
49
  if (delay < 0)
49
50
  argument_error(__FILE__, __LINE__);
@@ -58,7 +59,7 @@ namespace Beeps
58
59
  }
59
60
 
60
61
  void
61
- ADSR::note_off (float delay)
62
+ Envelope::note_off (float delay)
62
63
  {
63
64
  if (delay < 0)
64
65
  argument_error(__FILE__, __LINE__);
@@ -73,7 +74,7 @@ namespace Beeps
73
74
  }
74
75
 
75
76
  void
76
- ADSR::set_attack_time (float time)
77
+ Envelope::set_attack_time (float time)
77
78
  {
78
79
  if (time < 0)
79
80
  argument_error(__FILE__, __LINE__);
@@ -85,13 +86,13 @@ namespace Beeps
85
86
  }
86
87
 
87
88
  float
88
- ADSR::attack_time () const
89
+ Envelope::attack_time () const
89
90
  {
90
91
  return self->attack_time;
91
92
  }
92
93
 
93
94
  void
94
- ADSR::set_decay_time (float time)
95
+ Envelope::set_decay_time (float time)
95
96
  {
96
97
  if (time < 0)
97
98
  argument_error(__FILE__, __LINE__);
@@ -103,13 +104,13 @@ namespace Beeps
103
104
  }
104
105
 
105
106
  float
106
- ADSR::decay_time () const
107
+ Envelope::decay_time () const
107
108
  {
108
109
  return self->decay_time;
109
110
  }
110
111
 
111
112
  void
112
- ADSR::set_sustain_level (float level)
113
+ Envelope::set_sustain_level (float level)
113
114
  {
114
115
  if (level < 0)
115
116
  argument_error(__FILE__, __LINE__);
@@ -121,13 +122,13 @@ namespace Beeps
121
122
  }
122
123
 
123
124
  float
124
- ADSR::sustain_level () const
125
+ Envelope::sustain_level () const
125
126
  {
126
127
  return self->sustain_level;
127
128
  }
128
129
 
129
130
  void
130
- ADSR::set_release_time (float time)
131
+ Envelope::set_release_time (float time)
131
132
  {
132
133
  if (time < 0)
133
134
  argument_error(__FILE__, __LINE__);
@@ -139,7 +140,7 @@ namespace Beeps
139
140
  }
140
141
 
141
142
  float
142
- ADSR::release_time () const
143
+ Envelope::release_time () const
143
144
  {
144
145
  return self->release_time;
145
146
  }
@@ -157,11 +158,11 @@ namespace Beeps
157
158
  }
158
159
 
159
160
  static void
160
- process_envelope_signals (ADSR* adsr, Signals* signals)
161
+ process_envelope_signals (Envelope* envelope, Signals* signals)
161
162
  {
162
- assert(adsr && signals && signals->nchannels() == 1);
163
+ assert(envelope && signals && signals->nchannels() == 1);
163
164
 
164
- ADSR::Data* self = adsr->self.get();
165
+ Envelope::Data* self = envelope->self.get();
165
166
 
166
167
  Frames* frames = Signals_get_frames(signals);
167
168
  assert(frames);
@@ -214,7 +215,7 @@ namespace Beeps
214
215
  }
215
216
 
216
217
  void
217
- ADSR::filter (Context* context, Signals* signals, uint* offset)
218
+ Envelope::filter (Context* context, Signals* signals, uint* offset)
218
219
  {
219
220
  Super::filter(context, signals, offset);
220
221
 
@@ -228,10 +229,10 @@ namespace Beeps
228
229
  Signals_resize(&self->adsr_signals, signals->nsamples(), 0);
229
230
 
230
231
  process_envelope_signals(this, &self->adsr_signals);
231
- Signals_apply(signals, self->adsr_signals);
232
+ Signals_multiply(signals, self->adsr_signals);
232
233
  }
233
234
 
234
- ADSR::operator bool () const
235
+ Envelope::operator bool () const
235
236
  {
236
237
  if (!Super::operator bool()) return false;
237
238
  return
data/src/openal.cpp CHANGED
@@ -42,7 +42,9 @@ namespace Beeps
42
42
  void
43
43
  OpenAL_init ()
44
44
  {
45
- if (global::device || global::context)
45
+ if (global::device)
46
+ beeps_error(__FILE__, __LINE__, "already initialized.");
47
+ if (global::context)
46
48
  beeps_error(__FILE__, __LINE__, "already initialized.");
47
49
 
48
50
  global::device = alcOpenDevice(NULL);