summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-22 21:04:50 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-22 21:04:50 +0100
commit579dfce1bae018efd73c9f5f3f31770cb401d19a (patch)
treef7bb1b2ad0537515fe3478d9ffe46a081f3b3414 /src/lib/util.cc
parent71b7808830e17423453502ed5112b70bf90fff1b (diff)
Try again to sort out the audio padding / alignment.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 6221b8b62..81dc72b3d 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -735,6 +735,16 @@ AudioBuffers::set_frames (int f)
}
void
+AudioBuffers::make_silent ()
+{
+ for (int i = 0; i < _channels; ++i) {
+ for (int j = 0; j < _frames; ++j) {
+ _data[i][j] = 0;
+ }
+ }
+}
+
+void
ensure_ui_thread ()
{
assert (this_thread::get_id() == ui_thread);