diff options
Diffstat (limited to 'servers/audio_server.h')
-rw-r--r-- | servers/audio_server.h | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/servers/audio_server.h b/servers/audio_server.h index 8037c7feed..815200c811 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -53,14 +53,14 @@ class AudioDriver { #endif protected: - PoolVector<int32_t> capture_buffer; - unsigned int capture_position; - unsigned int capture_size; + Vector<int32_t> input_buffer; + unsigned int input_position; + unsigned int input_size; void audio_server_process(int p_frames, int32_t *p_buffer, bool p_update_mix_time = true); void update_mix_time(int p_frames); - void capture_buffer_init(int driver_buffer_frames); - void capture_buffer_write(int32_t sample); + void input_buffer_init(int driver_buffer_frames); + void input_buffer_write(int32_t sample); #ifdef DEBUG_ENABLED _FORCE_INLINE_ void start_counting_ticks() { prof_ticks = OS::get_singleton()->get_ticks_usec(); } @@ -111,11 +111,9 @@ public: SpeakerMode get_speaker_mode_by_total_channels(int p_channels) const; int get_total_channels_by_speaker_mode(SpeakerMode) const; - PoolVector<int32_t> get_capture_buffer() { return capture_buffer; } - unsigned int get_capture_position() { return capture_position; } - unsigned int get_capture_size() { return capture_size; } - - void clear_capture_buffer() { capture_buffer.resize(0); } + Vector<int32_t> get_input_buffer() { return input_buffer; } + unsigned int get_input_position() { return input_position; } + unsigned int get_input_size() { return input_size; } #ifdef DEBUG_ENABLED uint64_t get_profiling_time() const { return prof_time; } @@ -249,18 +247,6 @@ private: void _mix_step(); -#if 0 - struct AudioInBlock { - - Ref<AudioStreamSample> audio_stream; - int current_position; - bool loops; - }; - - Map<StringName, AudioInBlock *> audio_in_block_map; - Vector<AudioInBlock *> audio_in_blocks; -#endif - struct CallbackItem { AudioCallback callback; @@ -386,17 +372,10 @@ public: String get_device(); void set_device(String device); - Error capture_start(); - Error capture_stop(); - Array capture_get_device_list(); String capture_get_device(); void capture_set_device(const String &p_name); - PoolVector<int32_t> get_capture_buffer(); - unsigned int get_capture_position(); - unsigned int get_capture_size(); - AudioServer(); virtual ~AudioServer(); }; |