Audio sample containing many blocks. More...
#include <smaudio.hh>
Public Types | |
| enum | LoopType { LOOP_NONE = 0, LOOP_FRAME_FORWARD, LOOP_FRAME_PING_PONG, LOOP_TIME_FORWARD, LOOP_TIME_PING_PONG } |
Public Member Functions | |
| BseErrorType | load (const std::string &filename, AudioLoadOptions load_options=AUDIO_LOAD_DEBUG) |
| BseErrorType | load (SpectMorph::GenericIn *file, AudioLoadOptions load_options=AUDIO_LOAD_DEBUG) |
| BseErrorType | save (const std::string &filename) |
| BseErrorType | save (SpectMorph::GenericOut *file) |
Public Attributes | |
| float | fundamental_freq |
| fundamental frequency (note which was encoded), or 0 if not available | |
| float | mix_freq |
| mix freq (sampling rate) of the original audio data | |
| float | frame_size_ms |
| length of each audio frame in milliseconds | |
| float | frame_step_ms |
| stepping of the audio frames in milliseconds | |
| float | attack_start_ms |
| start of attack in milliseconds | |
| float | attack_end_ms |
| end of attack in milliseconds | |
| int | zeropad |
| FFT zeropadding used during analysis. | |
| LoopType | loop_type |
| type of loop to be used during sustain phase of playback | |
| int | loop_start |
| loop point to be used during sustain phase of playback | |
| int | loop_end |
| loop point to be used during sustain phase of playback | |
| int | zero_values_at_start |
| number of zero values added by encoder (strip during decoding) | |
| int | sample_count |
| number of samples encoded (including zero_values_at_start) | |
| std::vector< float > | original_samples |
| original time domain signal as samples (debugging only) | |
| std::vector< AudioBlock > | contents |
| the actual frame data | |
Audio sample containing many blocks.
This class contains the information the SpectMorph::Encoder creates for a wav file. The time dependant parameters are stored in contents, as a vector of audio frames; the parameters that are the same for all frames are stored in this class.
| BseErrorType SpectMorph::Audio::load | ( | const std::string & | filename, | |
| AudioLoadOptions | load_options = AUDIO_LOAD_DEBUG | |||
| ) |
This function loads a SM-File.
| filename | the name of the SM-File to be loaded | |
| load_options | specify whether to load or skip debug information |
| BseErrorType SpectMorph::Audio::save | ( | const std::string & | filename | ) |
This function saves a SM-File.
| filename | the name of the SM-File to be written |
1.7.1