Play sounds with SDL audio and stb_vorbis instead of SDL_mixer
Sounds decode once to 48 kHz stereo floats. Each play is a stream on one shared device, opened on the first play. A render's audio is mixed offline at 48 kHz, so command line renders get their sounds too. The About music is Ogg Vorbis now. Opus, libopus and libogg are gone.
This commit is contained in:
1 parent
7afdf709c3
commit
7e81ea4259
17 files changed
+249
-225
No files matched your search
+3
-3
@@ -6,7 +6,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "audio_data.h"
|
||||
#include "audio_stream.h"
|
||||
#include "audio.h"
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
struct SDL_Window;
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
float time_get() const;
|
||||
bool is_sound_frame() const;
|
||||
bool frame_capture(std::vector<uint8_t>, glm::ivec2, std::vector<const AudioData*> = {});
|
||||
void finish(const Document&, AudioStream&);
|
||||
void finish();
|
||||
void cancel();
|
||||
|
||||
private:
|
||||
@@ -187,4 +187,4 @@ bool animation_record(const RecorderOptions&, Canvas&, ShaderProgram&, Document&
|
||||
|
||||
std::filesystem::path ffmpeg_log_path();
|
||||
bool animation_render(const std::filesystem::path&, const std::filesystem::path&,
|
||||
const std::vector<std::filesystem::path>&, AudioStream&, RenderType, int);
|
||||
const std::vector<std::filesystem::path>&, const std::vector<float>&, RenderType, int);
|
||||
Reference in new issue
Block a user