@@ -24,7 +24,7 @@ namespace audio_tools {
24
24
*
25
25
* @tparam T
26
26
*/
27
- template <class T >
27
+ template <class T = int16_t >
28
28
class SoundGenerator {
29
29
public:
30
30
SoundGenerator () { info.bits_per_sample = sizeof (T) * 8 ; }
@@ -135,7 +135,7 @@ class SoundGenerator {
135
135
* @copyright GPLv3
136
136
*
137
137
*/
138
- template <class T >
138
+ template <class T = int16_t >
139
139
class SineWaveGenerator : public SoundGenerator <T> {
140
140
public:
141
141
// the scale defines the max value which is generated
@@ -231,7 +231,7 @@ class SineWaveGenerator : public SoundGenerator<T> {
231
231
* @copyright GPLv3
232
232
* @tparam T
233
233
*/
234
- template <class T >
234
+ template <class T = int16_t >
235
235
class FastSineGenerator : public SineWaveGenerator <T> {
236
236
public:
237
237
FastSineGenerator (float amplitude = 32767.0 , float phase = 0.0 )
@@ -267,7 +267,7 @@ class FastSineGenerator : public SineWaveGenerator<T> {
267
267
* @copyright GPLv3
268
268
*
269
269
*/
270
- template <class T >
270
+ template <class T = int16_t >
271
271
class SquareWaveGenerator : public FastSineGenerator <T> {
272
272
public:
273
273
SquareWaveGenerator (float amplitude = 32767 .0f , float phase = 0 .0f )
@@ -294,7 +294,7 @@ class SquareWaveGenerator : public FastSineGenerator<T> {
294
294
* @copyright GPLv3
295
295
* @tparam T
296
296
*/
297
- template <class T >
297
+ template <class T = int16_t >
298
298
class SawToothGenerator : public SineWaveGenerator <T> {
299
299
public:
300
300
SawToothGenerator (float amplitude = 32767.0 , float phase = 0.0 )
@@ -329,7 +329,7 @@ class SawToothGenerator : public SineWaveGenerator<T> {
329
329
* @copyright GPLv3
330
330
*
331
331
*/
332
- template <class T >
332
+ template <class T = int16_t >
333
333
class WhiteNoiseGenerator : public SoundGenerator <T> {
334
334
public:
335
335
// / the scale defines the max value which is generated
@@ -351,7 +351,7 @@ class WhiteNoiseGenerator : public SoundGenerator<T> {
351
351
* @copyright GPLv3
352
352
*
353
353
*/
354
- template <class T >
354
+ template <class T = int16_t >
355
355
class PinkNoiseGenerator : public SoundGenerator <T> {
356
356
public:
357
357
// / the amplitude defines the max value which is generated
@@ -398,7 +398,7 @@ class PinkNoiseGenerator : public SoundGenerator<T> {
398
398
* @copyright GPLv3
399
399
*
400
400
*/
401
- template <class T >
401
+ template <class T = int16_t >
402
402
class SilenceGenerator : public SoundGenerator <T> {
403
403
public:
404
404
// the scale defines the max value which is generated
@@ -420,7 +420,7 @@ class SilenceGenerator : public SoundGenerator<T> {
420
420
* @copyright GPLv3
421
421
* @tparam T
422
422
*/
423
- template <class T >
423
+ template <class T = int16_t >
424
424
class GeneratorFromStream : public SoundGenerator <T>, public VolumeSupport {
425
425
public:
426
426
GeneratorFromStream () {
@@ -484,7 +484,7 @@ class GeneratorFromStream : public SoundGenerator<T>, public VolumeSupport {
484
484
* @tparam T
485
485
*/
486
486
487
- template <class T >
487
+ template <class T = int16_t >
488
488
class GeneratorFromArray : public SoundGenerator <T> {
489
489
public:
490
490
GeneratorFromArray () = default ;
@@ -605,7 +605,7 @@ class GeneratorFromArray : public SoundGenerator<T> {
605
605
* @copyright GPLv3
606
606
* @tparam T
607
607
*/
608
- template <class T >
608
+ template <class T = int16_t >
609
609
class GeneratorFixedValue : public SoundGenerator <T> {
610
610
public:
611
611
GeneratorFixedValue () = default ;
@@ -642,7 +642,7 @@ class GeneratorFixedValue : public SoundGenerator<T> {
642
642
* @author Phil Schatzmann
643
643
* @copyright GPLv3
644
644
*/
645
- template <class T >
645
+ template <class T = int16_t >
646
646
class SineFromTable : public SoundGenerator <T> {
647
647
public:
648
648
SineFromTable (float amplitude = 32767.0 ) {
@@ -783,7 +783,7 @@ class SineFromTable : public SoundGenerator<T> {
783
783
* @copyright GPLv3
784
784
* @tparam T
785
785
*/
786
- template <class T >
786
+ template <class T = int16_t >
787
787
class GeneratorMixer : public SoundGenerator <T> {
788
788
public:
789
789
GeneratorMixer () = default ;
@@ -819,7 +819,7 @@ class GeneratorMixer : public SoundGenerator<T> {
819
819
* @copyright GPLv3
820
820
* @tparam T
821
821
*/
822
- template <class T >
822
+ template <class T = int16_t >
823
823
class TestGenerator : public SoundGenerator <T> {
824
824
public:
825
825
TestGenerator (T max = 1000 , T inc = 1 ) { this ->max = max; }
0 commit comments