Sets the audio buffer and updates the key settings
| 58 | |
| 59 | // Sets the audio buffer and updates the key settings |
| 60 | void AudioResampler::SetBuffer(juce::AudioBuffer<float> *new_buffer, double sample_rate, double new_sample_rate) |
| 61 | { |
| 62 | if (sample_rate <= 0) |
| 63 | sample_rate = 44100; |
| 64 | if (new_sample_rate <= 0) |
| 65 | new_sample_rate = 44100; |
| 66 | |
| 67 | // Set the sample ratio (the ratio of sample rate change) |
| 68 | source_ratio = sample_rate / new_sample_rate; |
| 69 | |
| 70 | // Call SetBuffer with ratio |
| 71 | SetBuffer(new_buffer, source_ratio); |
| 72 | } |
| 73 | |
| 74 | // Sets the audio buffer and key settings |
| 75 | void AudioResampler::SetBuffer(juce::AudioBuffer<float> *new_buffer, double ratio) |
no test coverage detected