Skip to content

Commit

Permalink
Export audio clip
Browse files Browse the repository at this point in the history
Fixes an issue with the audio preview generator using the wrong sample rate when clipping the audio which is resulting in incorrect exported audio files. Allows referencing and playing back audio clips and now generalizes the behavior as AssetFile(s).

Diffs=
a69bfba11 Export audio clip (#6949)

Co-authored-by: Luigi Rosso <[email protected]>
  • Loading branch information
luigi-rosso and luigi-rosso committed Mar 28, 2024
1 parent 1674c39 commit fc1d270
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .rive_head
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fee67f16df7648b5c9bc100b6221c7ba5baca0af
a69bfba11ec4a116b8712af0b685aa27a5309e43
2 changes: 1 addition & 1 deletion src/audio/audio_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AudioReader::AudioReader(rcp<AudioSource> audioSource, uint32_t channels) :
AudioReader::~AudioReader() { ma_decoder_uninit(&m_decoder); }

uint32_t AudioReader::channels() const { return m_channels; }
uint32_t AudioReader::sampleRate() const { return m_source->sampleRate(); }
uint32_t AudioReader::sampleRate() const { return m_decoder.outputSampleRate; }
ma_decoder* AudioReader::decoder() { return &m_decoder; }

uint64_t AudioReader::lengthInFrames()
Expand Down

0 comments on commit fc1d270

Please sign in to comment.