Constructor - image & audio
| 42 | |
| 43 | // Constructor - image & audio |
| 44 | Frame::Frame(int64_t number, int width, int height, std::string color, int samples, int channels) |
| 45 | : audio(std::make_shared<juce::AudioBuffer<float>>(channels, samples)), |
| 46 | number(number), width(width), height(height), |
| 47 | pixel_ratio(1,1), color(color), |
| 48 | channels(channels), channel_layout(LAYOUT_STEREO), |
| 49 | sample_rate(44100), |
| 50 | has_audio_data(false), has_image_data(false), |
| 51 | max_audio_sample(0), audio_is_increasing(true) |
| 52 | { |
| 53 | // zero (fill with silence) the audio buffer |
| 54 | audio->clear(); |
| 55 | } |
| 56 | |
| 57 | // Delegating Constructor - blank frame |
| 58 | Frame::Frame() : Frame::Frame(1, 1, 1, "#000000", 0, 2) {} |