summaryrefslogtreecommitdiff
path: root/dgedit/player.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-04-15 16:37:40 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-04-15 16:37:40 +0200
commitdf08f18af0162104e8192241aa380aef21193ddb (patch)
tree3c9305e2188ec3e2754ae47f26c2c5d006b4c89b /dgedit/player.cc
parentd9d3029db4bb509c34e9c243f225e2e2dbd2b055 (diff)
Fix missing initialisation of ao_sample_format struct. Start thread in constructor.
Diffstat (limited to 'dgedit/player.cc')
-rw-r--r--dgedit/player.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/dgedit/player.cc b/dgedit/player.cc
index 5f5c344..baaf975 100644
--- a/dgedit/player.cc
+++ b/dgedit/player.cc
@@ -42,6 +42,8 @@ Player::Player()
connect(&report_timer, SIGNAL(timeout()), this, SLOT(reportTimeout()));
report_timer.start(50); // Update 25 times per second
+
+ start();
}
Player::~Player()
@@ -55,6 +57,7 @@ void Player::run()
ao_initialize();
ao_sample_format sf;
+ memset(&sf, 0, sizeof(sf));
sf.bits = 16;
sf.rate = 44100;
sf.channels = 1;