@@ -24,7 +24,7 @@ namespace audio_tools {
2424 *
2525 * @tparam T
2626 */
27- template <class T >
27+ template <class T = int16_t >
2828class SoundGenerator {
2929 public:
3030 SoundGenerator () { info.bits_per_sample = sizeof (T) * 8 ; }
@@ -135,7 +135,7 @@ class SoundGenerator {
135135 * @copyright GPLv3
136136 *
137137 */
138- template <class T >
138+ template <class T = int16_t >
139139class SineWaveGenerator : public SoundGenerator <T> {
140140 public:
141141 // the scale defines the max value which is generated
@@ -231,7 +231,7 @@ class SineWaveGenerator : public SoundGenerator<T> {
231231 * @copyright GPLv3
232232 * @tparam T
233233 */
234- template <class T >
234+ template <class T = int16_t >
235235class FastSineGenerator : public SineWaveGenerator <T> {
236236 public:
237237 FastSineGenerator (float amplitude = 32767.0 , float phase = 0.0 )
@@ -267,7 +267,7 @@ class FastSineGenerator : public SineWaveGenerator<T> {
267267 * @copyright GPLv3
268268 *
269269 */
270- template <class T >
270+ template <class T = int16_t >
271271class SquareWaveGenerator : public FastSineGenerator <T> {
272272 public:
273273 SquareWaveGenerator (float amplitude = 32767 .0f , float phase = 0 .0f )
@@ -294,7 +294,7 @@ class SquareWaveGenerator : public FastSineGenerator<T> {
294294 * @copyright GPLv3
295295 * @tparam T
296296 */
297- template <class T >
297+ template <class T = int16_t >
298298class SawToothGenerator : public SineWaveGenerator <T> {
299299 public:
300300 SawToothGenerator (float amplitude = 32767.0 , float phase = 0.0 )
@@ -329,7 +329,7 @@ class SawToothGenerator : public SineWaveGenerator<T> {
329329 * @copyright GPLv3
330330 *
331331 */
332- template <class T >
332+ template <class T = int16_t >
333333class WhiteNoiseGenerator : public SoundGenerator <T> {
334334 public:
335335 // / the scale defines the max value which is generated
@@ -351,7 +351,7 @@ class WhiteNoiseGenerator : public SoundGenerator<T> {
351351 * @copyright GPLv3
352352 *
353353 */
354- template <class T >
354+ template <class T = int16_t >
355355class PinkNoiseGenerator : public SoundGenerator <T> {
356356 public:
357357 // / the amplitude defines the max value which is generated
@@ -398,7 +398,7 @@ class PinkNoiseGenerator : public SoundGenerator<T> {
398398 * @copyright GPLv3
399399 *
400400 */
401- template <class T >
401+ template <class T = int16_t >
402402class SilenceGenerator : public SoundGenerator <T> {
403403 public:
404404 // the scale defines the max value which is generated
@@ -420,7 +420,7 @@ class SilenceGenerator : public SoundGenerator<T> {
420420 * @copyright GPLv3
421421 * @tparam T
422422 */
423- template <class T >
423+ template <class T = int16_t >
424424class GeneratorFromStream : public SoundGenerator <T>, public VolumeSupport {
425425 public:
426426 GeneratorFromStream () {
@@ -484,7 +484,7 @@ class GeneratorFromStream : public SoundGenerator<T>, public VolumeSupport {
484484 * @tparam T
485485 */
486486
487- template <class T >
487+ template <class T = int16_t >
488488class GeneratorFromArray : public SoundGenerator <T> {
489489 public:
490490 GeneratorFromArray () = default ;
@@ -605,7 +605,7 @@ class GeneratorFromArray : public SoundGenerator<T> {
605605 * @copyright GPLv3
606606 * @tparam T
607607 */
608- template <class T >
608+ template <class T = int16_t >
609609class GeneratorFixedValue : public SoundGenerator <T> {
610610 public:
611611 GeneratorFixedValue () = default ;
@@ -642,7 +642,7 @@ class GeneratorFixedValue : public SoundGenerator<T> {
642642 * @author Phil Schatzmann
643643 * @copyright GPLv3
644644 */
645- template <class T >
645+ template <class T = int16_t >
646646class SineFromTable : public SoundGenerator <T> {
647647 public:
648648 SineFromTable (float amplitude = 32767.0 ) {
@@ -783,7 +783,7 @@ class SineFromTable : public SoundGenerator<T> {
783783 * @copyright GPLv3
784784 * @tparam T
785785 */
786- template <class T >
786+ template <class T = int16_t >
787787class GeneratorMixer : public SoundGenerator <T> {
788788 public:
789789 GeneratorMixer () = default ;
@@ -819,7 +819,7 @@ class GeneratorMixer : public SoundGenerator<T> {
819819 * @copyright GPLv3
820820 * @tparam T
821821 */
822- template <class T >
822+ template <class T = int16_t >
823823class TestGenerator : public SoundGenerator <T> {
824824 public:
825825 TestGenerator (T max = 1000 , T inc = 1 ) { this ->max = max; }
0 commit comments