Skip to content

Commit

Permalink
Examples remove sound_t data type
Browse files Browse the repository at this point in the history
  • Loading branch information
pschatzmann committed Jul 17, 2024
1 parent a72386f commit d9c765b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

#include "AudioTools.h"

typedef int16_t sound_t; // sound will be represented as int16_t (with 2 bytes)
AudioInfo info(8000, 1, 16);
SineWaveGenerator<sound_t> sineWave(32000); // subclass of SoundGenerator with max amplitude of 32000
GeneratedSoundStream<sound_t> sound(sineWave); // Stream generated from sine wave
SineWaveGenerator<int16_t> sineWave(32000); // subclass of SoundGenerator with max amplitude of 32000
GeneratedSoundStream<int16_t> sound(sineWave); // Stream generated from sine wave
AnalogAudioStream out;
StreamCopy copier(out, sound); // copies sound into i2s

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
#include "AudioTools.h"


typedef int16_t sound_t; // sound will be represented as int16_t (with 2 bytes)
AudioInfo info(44100, 2, 16);
SineWaveGenerator<sound_t> sineWave(32000); // subclass of SoundGenerator with max amplitude of 32000
GeneratedSoundStream<sound_t> sound(sineWave); // Stream generated from sine wave
SineWaveGenerator<int16_t> sineWave(32000); // subclass of SoundGenerator with max amplitude of 32000
GeneratedSoundStream<int16_t> sound(sineWave); // Stream generated from sine wave
SPDIFOutput out;
StreamCopy copier(out, sound, 2048); // copies sound into i2s

Expand Down
2 changes: 1 addition & 1 deletion src/AudioTools/AudioOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ using MemoryPrint = MemoryOutput;

/**
* @brief Simple functionality to extract mono streams from a multichannel (e.g.
* stereo) signal.
* stereo) signal.
* @ingroup transform
* @author Phil Schatzmann
* @copyright GPLv3
Expand Down

0 comments on commit d9c765b

Please sign in to comment.