Audio Sample Splitter
A program to read and split audio into instrument samples
 All Classes Functions
Public Member Functions | List of all members
LiveRecordingSimulator Class Reference

#include <LiveRecordingSimulator.h>

+ Inheritance diagram for LiveRecordingSimulator:
+ Collaboration diagram for LiveRecordingSimulator:

Public Member Functions

 LiveRecordingSimulator (std::string filename, int buffer_size)
 
void init ()
 
void start ()
 Tells the manager its bit depth and sample rate when initialized.
 
void update ()
 Every update sends the next json audio data packet through the left and right channels.
 
void stop ()
 
void split_audio_into_packets ()
 

Detailed Description

Reads .wav file and sends audio data packets in left and right channels, 1 json array per update. Its purpose is to simulate an audio recording device, streaming live.

Definition at line 24 of file LiveRecordingSimulator.h.

Constructor & Destructor Documentation

LiveRecordingSimulator::LiveRecordingSimulator ( std::string  filename,
int  buffer_size 
)
inline

Calls for the .wav file to be prepared for shipment as soon as it is instantiated.

Parameters
filenameThe .wav file to be read.
buffer_sizeThe size of the data packets to be sent.

Definition at line 31 of file LiveRecordingSimulator.h.

Member Function Documentation

void LiveRecordingSimulator::split_audio_into_packets ( )

Splits the audio data from the .wav file into buffer sized packets. Converts the data packets to json and adds them to an array of json packets.

Definition at line 72 of file LiveRecordingSimulator.h.


The documentation for this class was generated from the following file: