summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorGustav Lund <glu@gamblify.com>2018-01-18 16:03:53 +0100
committerGustav Lund <glu@gamblify.com>2018-07-26 14:14:29 +0200
commitcd2070c684c9befa4a0c8badfecfcded07d490c0 (patch)
tree0afd4e374d2879b74e9f669dbca3861c715c5cb7 /scene/resources
parent8c9e10553cd429857086a9d635fc55305065ff76 (diff)
Audio Recording module
Implements an Audio bus effect that outputs the audio from the bus into a wav file Now channels audio recording into an AudioStreamSample instead of saving to wav
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/audio_stream_sample.cpp4
-rw-r--r--scene/resources/audio_stream_sample.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/audio_stream_sample.cpp b/scene/resources/audio_stream_sample.cpp
index 02a9e4d69b..cc5d9ccb9f 100644
--- a/scene/resources/audio_stream_sample.cpp
+++ b/scene/resources/audio_stream_sample.cpp
@@ -509,6 +509,10 @@ PoolVector<uint8_t> AudioStreamSample::get_data() const {
return pv;
}
+void AudioStreamSample::save_to_wav(String p_path) {
+// TODO! Implement saving to wav file
+}
+
Ref<AudioStreamPlayback> AudioStreamSample::instance_playback() {
Ref<AudioStreamPlaybackSample> sample;
diff --git a/scene/resources/audio_stream_sample.h b/scene/resources/audio_stream_sample.h
index 5fe65c194e..a27acc92b7 100644
--- a/scene/resources/audio_stream_sample.h
+++ b/scene/resources/audio_stream_sample.h
@@ -140,6 +140,8 @@ public:
void set_data(const PoolVector<uint8_t> &p_data);
PoolVector<uint8_t> get_data() const;
+ void save_to_wav(String p_path);
+
virtual Ref<AudioStreamPlayback> instance_playback();
virtual String get_stream_name() const;