Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions SerialPrograms/Source/CommonFramework/AudioPipeline/AudioInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ const char* AUDIO_FORMAT_LABELS[] = {
"1 x 96,000 Hz (Interleaved Stereo R/L)",
};

size_t sample_size(AudioSampleFormat format){
switch (format){
case AudioSampleFormat::UINT8:
return sizeof(uint8_t);
case AudioSampleFormat::SINT16:
return sizeof(int16_t);
case AudioSampleFormat::SINT32:
return sizeof(int32_t);
case AudioSampleFormat::FLOAT32:
return sizeof(float);
default:
throw InternalProgramError(nullptr, PA_CURRENT_FUNCTION, "Invalid AudioSampleFormat: " + std::to_string((size_t)format));
}
}



void set_format(QAudioFormat& native_format, AudioChannelFormat format){
switch (format){
case AudioChannelFormat::MONO_48000:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace PokemonAutomation{

struct AudioFloatStreamListener;
struct FFTListener;

namespace Kernels{
Expand All @@ -32,9 +31,6 @@ class WorkingAudioStreamListener;
//
class AudioPassthroughPair{
public:
virtual void add_listener(AudioFloatStreamListener& listener) = 0;
virtual void remove_listener(AudioFloatStreamListener& listener) = 0;

virtual void add_listener(FFTListener& listener) = 0;
virtual void remove_listener(FFTListener& listener) = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ void AudioSession::add_state_listener(StateListener& listener){
void AudioSession::remove_state_listener(StateListener& listener){
m_listeners.remove(listener);
}
void AudioSession::add_stream_listener(AudioFloatStreamListener& listener){
m_devices->add_listener(listener);
}
void AudioSession::remove_stream_listener(AudioFloatStreamListener& listener){
m_devices->remove_listener(listener);
}
void AudioSession::add_working_stream_listener(
const AudioFormat& format, Kernels::AudioPipeline::WorkingAudioStreamListener& listener
){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "Common/Cpp/Concurrency/Watchdog.h"
#include "AudioFeed.h"
#include "AudioPassthroughPair.h"
#include "AudioStream.h"
#include "Spectrum/FFTStreamer.h"
#include "Spectrum/AudioSpectrumHolder.h"
#include "AudioOption.h"
Expand All @@ -42,9 +41,6 @@ class AudioSession final : public AudioFeed, private FFTListener, private Watchd
void add_state_listener(StateListener& listener);
void remove_state_listener(StateListener& listener);

void add_stream_listener(AudioFloatStreamListener& listener);
void remove_stream_listener(AudioFloatStreamListener& listener);

// Attach a listener that receives the working audio stream (float)
// converted to the requested format. See AudioPassthroughPair.
void add_working_stream_listener(const AudioFormat& format, Kernels::AudioPipeline::WorkingAudioStreamListener& listener);
Expand Down
147 changes: 0 additions & 147 deletions SerialPrograms/Source/CommonFramework/AudioPipeline/AudioStream.cpp

This file was deleted.

68 changes: 0 additions & 68 deletions SerialPrograms/Source/CommonFramework/AudioPipeline/AudioStream.h

This file was deleted.

Loading
Loading