summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2006-11-01 21:24:41 +0000
committerWerner Schweer <ws.seh.de>2006-11-01 21:24:41 +0000
commit49d2fcd9d8ed4f59cb30c87923cdfa202c2d4370 (patch)
tree0109677062a799a650ea3c20505bc47ca9dd3d3e
parent3b54037604daf134fc59d01015007311e69c473a (diff)
fix crash when switching audio output from stereo to mono and back
-rw-r--r--muse/muse/seqmsg.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/muse/muse/seqmsg.cpp b/muse/muse/seqmsg.cpp
index c9e1d349..0db3f0ab 100644
--- a/muse/muse/seqmsg.cpp
+++ b/muse/muse/seqmsg.cpp
@@ -230,13 +230,13 @@ void Audio::msgSetChannels(AudioTrack* node, int n)
else if (node->type() == Track::AUDIO_OUTPUT) {
AudioOutput* ao = (AudioOutput*)node;
for (int i = 0; i < mc; ++i) {
- void* jp = ao->jackPort(i).jackPort();
- if (i < n && jp == 0) {
+ Port port = ao->jackPort(i);
+ if (i < n && port.isZero()) {
char buffer[128];
snprintf(buffer, 128, "%s-%d", name.toLatin1().data(), i);
ao->setJackPort(audioDriver->registerOutPort(QString(buffer), false), i);
}
- else if (i >= n && jp) {
+ else if (i >= n && !port.isZero()) {
RouteList* ir = node->outRoutes();
for (iRoute ii = ir->begin(); ii != ir->end(); ++ii) {
Route r = *ii;