Fix to make sure the capture buffers are deallocated at shutdown. Silences warnings.
This commit is contained in:
parent
3cc94b2c0b
commit
dabaa11b3c
@ -1079,6 +1079,7 @@ void AudioServer::finish() {
|
|||||||
|
|
||||||
for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
|
for (int i = 0; i < AudioDriverManager::get_driver_count(); i++) {
|
||||||
AudioDriverManager::get_driver(i)->finish();
|
AudioDriverManager::get_driver(i)->finish();
|
||||||
|
AudioDriverManager::get_driver(i)->clear_capture_buffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < buses.size(); i++) {
|
for (int i = 0; i < buses.size(); i++) {
|
||||||
|
@ -115,6 +115,8 @@ public:
|
|||||||
unsigned int get_capture_position() { return capture_position; }
|
unsigned int get_capture_position() { return capture_position; }
|
||||||
unsigned int get_capture_size() { return capture_size; }
|
unsigned int get_capture_size() { return capture_size; }
|
||||||
|
|
||||||
|
void clear_capture_buffer() { capture_buffer.resize(0); }
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
uint64_t get_profiling_time() const { return prof_time; }
|
uint64_t get_profiling_time() const { return prof_time; }
|
||||||
void reset_profiling_time() { prof_time = 0; }
|
void reset_profiling_time() { prof_time = 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user