Mailinglist Archive: opensuse-commit (1903 mails)

< Previous Next >
commit Jamulus for openSUSE:Factory
Hello community,

here is the log from the commit of package Jamulus for openSUSE:Factory checked
in at 2019-04-23 14:35:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/Jamulus (Old)
and /work/SRC/openSUSE:Factory/.Jamulus.new.5536 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "Jamulus"

Tue Apr 23 14:35:55 2019 rev:3 rq:696757 version:3.4.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/Jamulus/Jamulus.changes 2018-03-19
23:38:11.817745661 +0100
+++ /work/SRC/openSUSE:Factory/.Jamulus.new.5536/Jamulus.changes
2019-04-23 14:35:57.877469038 +0200
@@ -1,0 +2,7 @@
+Mon Apr 22 11:58:26 UTC 2019 - Luigi Baldoni <aloisio@xxxxxxx>
+
+- Update to version 3.4.3
+ * for ASIO and 4 channel input, support mixing channels 1&2
+ with 3&4
+
+-------------------------------------------------------------------

Old:
----
Jamulus-3.4.2.tar.gz

New:
----
Jamulus-3.4.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ Jamulus.spec ++++++
--- /var/tmp/diff_new_pack.thoGQa/_old 2019-04-23 14:35:58.477469462 +0200
+++ /var/tmp/diff_new_pack.thoGQa/_new 2019-04-23 14:35:58.477469462 +0200
@@ -1,7 +1,7 @@
#
# spec file for package Jamulus
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2014 Pascal Bleser <pascal.bleser@xxxxxxxxxxxx>
#
# All modifications and additions to the file contributed by third parties
@@ -13,15 +13,15 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name: Jamulus
-Version: 3.4.2
+Version: 3.4.3
Release: 0
Summary: Low-latency internet connection tool for real-time jam sessions
-License: GPL-2.0+
+License: GPL-2.0-or-later
Group: Productivity/Multimedia/Sound/Utilities
URL: http://llcon.sourceforge.net/index.html
Source0:
https://sourceforge.net/projects/llcon/files/Jamulus/%{version}/Jamulus-%{version}.tar.gz

++++++ Jamulus-3.4.2.tar.gz -> Jamulus-3.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/ChangeLog new/Jamulus3.4.3/ChangeLog
--- old/Jamulus3.4.2/ChangeLog 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/ChangeLog 2018-05-17 19:39:34.000000000 +0200
@@ -1,10 +1,21 @@
+
+
+
+
+3.4.3 (2018-05-17)
+
+- for ASIO and 4 channel input, support mixing channels 1&2 with 3&4
+
+- bug fix: fixed a crash, running Jamulus on MacOS version "High Sierra"
+
+
3.4.2 (2017-08-11)

- removed old CELT library (minimum compatible version is now 3.3.1)

- show server name in the server list in bold font if it is a permanent server

-- Jack can be used instead of CoreAudio on MacOs (using qmake
"CONFIG+=jackonmac")
+- Jack can be used instead of CoreAudio on MacOS (using qmake
"CONFIG+=jackonmac")


3.4.1 (2016-02-10)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/INSTALL new/Jamulus3.4.3/INSTALL
--- old/Jamulus3.4.2/INSTALL 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/INSTALL 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/Jamulus.pro new/Jamulus3.4.3/Jamulus.pro
--- old/Jamulus3.4.2/Jamulus.pro 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/Jamulus.pro 2018-05-17 19:39:34.000000000 +0200
@@ -1,4 +1,4 @@
-VERSION = 3.4.2
+VERSION = 3.4.3

# use target name which does not use a captital letter at the beginning
contains(CONFIG, "noupcasename") {
@@ -44,6 +44,25 @@
advapi32.lib \
winmm.lib \
ws2_32.lib
+
+ # replace ASIO with jack if requested
+ contains(CONFIG, "jackonwindows") {
+ message(Using Jack instead of ASIO.)
+
+ !exists("C:/Program Files (x86)/Jack/includes/jack/jack.h") {
+ message(Warning: jack.h was not found at the usual place, maybe
jack is not installed)
+ }
+
+ HEADERS -= windows/sound.h
+ SOURCES -= windows/sound.cpp
+ HEADERS += linux/sound.h
+ SOURCES += linux/sound.cpp
+ DEFINES += WITH_SOUND
+ DEFINES += JACK_REPLACES_ASIO
+ DEFINES += _STDINT_H # supposed to solve compilation error in
systemdeps.h
+ INCLUDEPATH += "C:/Program Files (x86)/Jack/includes"
+ LIBS += "C:/Program Files (x86)/Jack/lib/libjack64.lib"
+ }
} else:macx {
QT += macextras
HEADERS += mac/sound.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/README new/Jamulus3.4.3/README
--- old/Jamulus3.4.2/README 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/README 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/android/sound.cpp
new/Jamulus3.4.3/android/sound.cpp
--- old/Jamulus3.4.2/android/sound.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/android/sound.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/android/sound.h
new/Jamulus3.4.3/android/sound.h
--- old/Jamulus3.4.2/android/sound.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/android/sound.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/linux/sound.cpp
new/Jamulus3.4.3/linux/sound.cpp
--- old/Jamulus3.4.2/linux/sound.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/linux/sound.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/linux/sound.h
new/Jamulus3.4.3/linux/sound.h
--- old/Jamulus3.4.2/linux/sound.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/linux/sound.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -25,10 +25,12 @@
#if !defined(_SOUND_H__9518A621345F78_3634567_8C0D_EEBF182CF549__INCLUDED_)
#define _SOUND_H__9518A621345F78_3634567_8C0D_EEBF182CF549__INCLUDED_

-#include <unistd.h>
+#ifndef JACK_REPLACES_ASIO // these headers are not available in Windows OS
+# include <unistd.h>
+# include <sys/ioctl.h>
+#endif
#include <fcntl.h>
#include <sys/types.h>
-#include <sys/ioctl.h>
#include <stdlib.h>
#include <stdio.h>
#include <QThread>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/mac/sound.cpp
new/Jamulus3.4.3/mac/sound.cpp
--- old/Jamulus3.4.2/mac/sound.cpp 2017-08-11 14:25:05.000000000 +0200
+++ new/Jamulus3.4.3/mac/sound.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -161,6 +161,12 @@
lCurDev = INVALID_SNC_CARD_DEVICE;
CurrentAudioInputDeviceID = 0;
CurrentAudioOutputDeviceID = 0;
+ iNumInChan = 0;
+ iNumOutChan = 0;
+ iSelInputLeftChannel = 0;
+ iSelInputRightChannel = 0;
+ iSelOutputLeftChannel = 0;
+ iSelOutputRightChannel = 0;
}

void CSound::GetAudioDeviceInfos ( const AudioDeviceID DeviceID,
@@ -771,6 +777,23 @@
// right
pSound->vecsTmpAudioSndCrdStereo[2 * i + 1] =
(short) ( pInData[iNumInChan * i + iSelInputRightChannel]
* _MAXSHORT );
+
+
+/*
+// TEST mix channel with micro to the stereo output
+if ( iNumInChan == 4 )
+{
+ // add mic input on input channel 4 to both stereo channels
+ pSound->vecsTmpAudioSndCrdStereo[2 * i] =
+ Double2Short ( (double) ( pInData[iNumInChan * i + 3] * _MAXSHORT ) +
+ (double) pSound->vecsTmpAudioSndCrdStereo[2 * i] );
+ pSound->vecsTmpAudioSndCrdStereo[2 * i + 1] =
+ Double2Short ( (double) ( pInData[iNumInChan * i + 3] * _MAXSHORT ) +
+ (double) pSound->vecsTmpAudioSndCrdStereo[2 * i + 1] );
+}
+*/
+
+
}
}
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/mac/sound.h new/Jamulus3.4.3/mac/sound.h
--- old/Jamulus3.4.2/mac/sound.h 2017-08-11 14:25:05.000000000 +0200
+++ new/Jamulus3.4.3/mac/sound.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/aboutdlgbase.ui
new/Jamulus3.4.3/src/aboutdlgbase.ui
--- old/Jamulus3.4.2/src/aboutdlgbase.ui 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/aboutdlgbase.ui 2018-05-17 19:39:34.000000000
+0200
@@ -135,7 +135,7 @@
<item>
<widget class="QLabel" name="lblCopyright">
<property name="text">
- <string>Copyright (C) 2005-2016</string>
+ <string>Copyright (C) 2005-2018</string>
</property>
<property name="wordWrap">
<bool>false</bool>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/analyzerconsole.cpp
new/Jamulus3.4.3/src/analyzerconsole.cpp
--- old/Jamulus3.4.2/src/analyzerconsole.cpp 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/analyzerconsole.cpp 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/analyzerconsole.h
new/Jamulus3.4.3/src/analyzerconsole.h
--- old/Jamulus3.4.2/src/analyzerconsole.h 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/analyzerconsole.h 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/audiomixerboard.cpp
new/Jamulus3.4.3/src/audiomixerboard.cpp
--- old/Jamulus3.4.2/src/audiomixerboard.cpp 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/audiomixerboard.cpp 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/audiomixerboard.h
new/Jamulus3.4.3/src/audiomixerboard.h
--- old/Jamulus3.4.2/src/audiomixerboard.h 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/audiomixerboard.h 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/buffer.cpp
new/Jamulus3.4.3/src/buffer.cpp
--- old/Jamulus3.4.2/src/buffer.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/buffer.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/buffer.h
new/Jamulus3.4.3/src/buffer.h
--- old/Jamulus3.4.2/src/buffer.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/buffer.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/channel.cpp
new/Jamulus3.4.3/src/channel.cpp
--- old/Jamulus3.4.2/src/channel.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/channel.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/channel.h
new/Jamulus3.4.3/src/channel.h
--- old/Jamulus3.4.2/src/channel.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/channel.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/chatdlg.cpp
new/Jamulus3.4.3/src/chatdlg.cpp
--- old/Jamulus3.4.2/src/chatdlg.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/chatdlg.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/chatdlg.h
new/Jamulus3.4.3/src/chatdlg.h
--- old/Jamulus3.4.2/src/chatdlg.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/chatdlg.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/client.cpp
new/Jamulus3.4.3/src/client.cpp
--- old/Jamulus3.4.2/src/client.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/client.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/client.h
new/Jamulus3.4.3/src/client.h
--- old/Jamulus3.4.2/src/client.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/client.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -43,7 +43,7 @@
#ifdef LLCON_VST_PLUGIN
# include "vstsound.h"
#else
-# ifdef _WIN32
+# if defined ( _WIN32 ) && !defined ( JACK_REPLACES_ASIO )
# include "../windows/sound.h"
# else
# if ( defined ( __APPLE__ ) || defined ( __MACOSX ) ) && !defined (
JACK_REPLACES_COREAUDIO )
@@ -53,9 +53,11 @@
# include "../android/sound.h"
# else
# include "../linux/sound.h"
-# include <sched.h>
+# ifndef JACK_REPLACES_ASIO // these headers are not available in Windows OS
+# include <sched.h>
+# include <netdb.h>
+# endif
# include <socket.h>
-# include <netdb.h>
# endif
# endif
# endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/clientdlg.cpp
new/Jamulus3.4.3/src/clientdlg.cpp
--- old/Jamulus3.4.2/src/clientdlg.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/clientdlg.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/clientdlg.h
new/Jamulus3.4.3/src/clientdlg.h
--- old/Jamulus3.4.2/src/clientdlg.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/clientdlg.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/clientsettingsdlg.cpp
new/Jamulus3.4.3/src/clientsettingsdlg.cpp
--- old/Jamulus3.4.2/src/clientsettingsdlg.cpp 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/clientsettingsdlg.cpp 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -542,8 +542,11 @@
cbxLInChan->addItem ( pClient->GetSndCrdInputChannelName (
iSndChanIdx ) );
cbxRInChan->addItem ( pClient->GetSndCrdInputChannelName (
iSndChanIdx ) );
}
- cbxLInChan->setCurrentIndex ( pClient->GetSndCrdLeftInputChannel() );
- cbxRInChan->setCurrentIndex ( pClient->GetSndCrdRightInputChannel() );
+ if ( pClient->GetSndCrdNumInputChannels() > 0 )
+ {
+ cbxLInChan->setCurrentIndex ( pClient->GetSndCrdLeftInputChannel()
);
+ cbxRInChan->setCurrentIndex (
pClient->GetSndCrdRightInputChannel() );
+ }

// output
cbxLOutChan->clear();
@@ -553,8 +556,11 @@
cbxLOutChan->addItem ( pClient->GetSndCrdOutputChannelName (
iSndChanIdx ) );
cbxROutChan->addItem ( pClient->GetSndCrdOutputChannelName (
iSndChanIdx ) );
}
- cbxLOutChan->setCurrentIndex ( pClient->GetSndCrdLeftOutputChannel() );
- cbxROutChan->setCurrentIndex ( pClient->GetSndCrdRightOutputChannel()
);
+ if ( pClient->GetSndCrdNumOutputChannels() > 0 )
+ {
+ cbxLOutChan->setCurrentIndex (
pClient->GetSndCrdLeftOutputChannel() );
+ cbxROutChan->setCurrentIndex (
pClient->GetSndCrdRightOutputChannel() );
+ }
}
#else
// for other OS, no sound card channel selection is supported
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/clientsettingsdlg.h
new/Jamulus3.4.3/src/clientsettingsdlg.h
--- old/Jamulus3.4.2/src/clientsettingsdlg.h 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/clientsettingsdlg.h 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/connectdlg.cpp
new/Jamulus3.4.3/src/connectdlg.cpp
--- old/Jamulus3.4.2/src/connectdlg.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/connectdlg.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -88,9 +88,13 @@
lvwServers->setColumnWidth ( 0, 180 );
lvwServers->setColumnWidth ( 1, 65 );
lvwServers->setColumnWidth ( 2, 60 );
+ lvwServers->setColumnWidth ( 3, 220 );
#endif
lvwServers->clear();

+ // make sure we do not get a too long horizontal scroll bar
+ lvwServers->header()->setStretchLastSection ( false );
+
// add invisible columns which are used for sorting the list and storing
// the current/maximum number of clients
// 0: server name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/connectdlg.h
new/Jamulus3.4.3/src/connectdlg.h
--- old/Jamulus3.4.2/src/connectdlg.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/connectdlg.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/global.h
new/Jamulus3.4.3/src/global.h
--- old/Jamulus3.4.2/src/global.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/global.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * \Copyright (c) 2004-2016
+ * \Copyright (c) 2004-2018
* \author Volker Fischer
*

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/main.cpp
new/Jamulus3.4.3/src/main.cpp
--- old/Jamulus3.4.2/src/main.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/main.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/multicolorled.cpp
new/Jamulus3.4.3/src/multicolorled.cpp
--- old/Jamulus3.4.2/src/multicolorled.cpp 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/multicolorled.cpp 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/multicolorled.h
new/Jamulus3.4.3/src/multicolorled.h
--- old/Jamulus3.4.2/src/multicolorled.h 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/multicolorled.h 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/multicolorledbar.cpp
new/Jamulus3.4.3/src/multicolorledbar.cpp
--- old/Jamulus3.4.2/src/multicolorledbar.cpp 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/multicolorledbar.cpp 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/multicolorledbar.h
new/Jamulus3.4.3/src/multicolorledbar.h
--- old/Jamulus3.4.2/src/multicolorledbar.h 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/multicolorledbar.h 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/protocol.cpp
new/Jamulus3.4.3/src/protocol.cpp
--- old/Jamulus3.4.2/src/protocol.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/protocol.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/protocol.h
new/Jamulus3.4.3/src/protocol.h
--- old/Jamulus3.4.2/src/protocol.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/protocol.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/server.cpp
new/Jamulus3.4.3/src/server.cpp
--- old/Jamulus3.4.2/src/server.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/server.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/server.h
new/Jamulus3.4.3/src/server.h
--- old/Jamulus3.4.2/src/server.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/server.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/serverdlg.cpp
new/Jamulus3.4.3/src/serverdlg.cpp
--- old/Jamulus3.4.2/src/serverdlg.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/serverdlg.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/serverdlg.h
new/Jamulus3.4.3/src/serverdlg.h
--- old/Jamulus3.4.2/src/serverdlg.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/serverdlg.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/serverlist.cpp
new/Jamulus3.4.3/src/serverlist.cpp
--- old/Jamulus3.4.2/src/serverlist.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/serverlist.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/serverlist.h
new/Jamulus3.4.3/src/serverlist.h
--- old/Jamulus3.4.2/src/serverlist.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/serverlist.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/serverlogging.cpp
new/Jamulus3.4.3/src/serverlogging.cpp
--- old/Jamulus3.4.2/src/serverlogging.cpp 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/serverlogging.cpp 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/serverlogging.h
new/Jamulus3.4.3/src/serverlogging.h
--- old/Jamulus3.4.2/src/serverlogging.h 2017-08-11 14:25:06.000000000
+0200
+++ new/Jamulus3.4.3/src/serverlogging.h 2018-05-17 19:39:34.000000000
+0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/settings.cpp
new/Jamulus3.4.3/src/settings.cpp
--- old/Jamulus3.4.2/src/settings.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/settings.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/settings.h
new/Jamulus3.4.3/src/settings.h
--- old/Jamulus3.4.2/src/settings.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/settings.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/socket.cpp
new/Jamulus3.4.3/src/socket.cpp
--- old/Jamulus3.4.2/src/socket.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/socket.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -66,9 +66,9 @@
{
UdpSocketInAddr.sin_port = htons ( iPortNumber +
iClientPortIncrement );

- bSuccess = ( bind ( UdpSocket ,
- (sockaddr*) &UdpSocketInAddr,
- sizeof ( sockaddr_in ) ) == 0 );
+ bSuccess = ( ::bind ( UdpSocket ,
+ (sockaddr*) &UdpSocketInAddr,
+ sizeof ( sockaddr_in ) ) == 0 );

iClientPortIncrement++;
}
@@ -80,9 +80,9 @@
// gets the desired port number
UdpSocketInAddr.sin_port = htons ( iPortNumber );

- bSuccess = ( bind ( UdpSocket ,
- (sockaddr*) &UdpSocketInAddr,
- sizeof ( sockaddr_in ) ) == 0 );
+ bSuccess = ( ::bind ( UdpSocket ,
+ (sockaddr*) &UdpSocketInAddr,
+ sizeof ( sockaddr_in ) ) == 0 );
}

if ( !bSuccess )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/socket.h
new/Jamulus3.4.3/src/socket.h
--- old/Jamulus3.4.2/src/socket.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/socket.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/soundbase.cpp
new/Jamulus3.4.3/src/soundbase.cpp
--- old/Jamulus3.4.2/src/soundbase.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/soundbase.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/soundbase.h
new/Jamulus3.4.3/src/soundbase.h
--- old/Jamulus3.4.2/src/soundbase.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/soundbase.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/testbench.h
new/Jamulus3.4.3/src/testbench.h
--- old/Jamulus3.4.2/src/testbench.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/testbench.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/util.cpp
new/Jamulus3.4.3/src/util.cpp
--- old/Jamulus3.4.2/src/util.cpp 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/util.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/src/util.h new/Jamulus3.4.3/src/util.h
--- old/Jamulus3.4.2/src/util.h 2017-08-11 14:25:06.000000000 +0200
+++ new/Jamulus3.4.3/src/util.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -139,7 +139,7 @@
const bool bDoAdding = true );

// this function simply converts the type of size to integer
- inline int Size() const { return std::vector<TData>::size(); }
+ inline int Size() const { return static_cast<int> (
std::vector<TData>::size() ); }

// This operator allows for a l-value assignment of this object:
// CVector[x] = y is possible
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/windows/sound.cpp
new/Jamulus3.4.3/windows/sound.cpp
--- old/Jamulus3.4.2/windows/sound.cpp 2017-08-11 14:25:05.000000000 +0200
+++ new/Jamulus3.4.3/windows/sound.cpp 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -44,6 +44,7 @@
{
// load driver
loadAsioDriver ( cDriverNames[iDriverIdx] );
+
if ( ASIOInit ( &driverInfo ) != ASE_OK )
{
// clean up and return error string
@@ -91,6 +92,7 @@

// check the sample rate
const ASIOError CanSaRateReturn = ASIOCanSampleRate (
SYSTEM_SAMPLE_RATE_HZ );
+
if ( ( CanSaRateReturn == ASE_NoClock ) ||
( CanSaRateReturn == ASE_NotPresent ) )
{
@@ -102,6 +104,7 @@

// check the number of available channels
ASIOGetChannels ( &lNumInChan, &lNumOutChan );
+
if ( ( lNumInChan < NUM_IN_OUT_CHANNELS ) ||
( lNumOutChan < NUM_IN_OUT_CHANNELS ) )
{
@@ -123,6 +126,8 @@
}

// query channel infos for all available input channels
+ bool bInputChMixingSupported = true;
+
for ( int i = 0; i < lNumInChan; i++ )
{
// setup for input channels
@@ -142,6 +147,14 @@
// return error string
return tr ( "Required audio sample format not available." );
}
+
+ // store the name of the channel and check if channel mixing is
supported
+ channelInputName[i] = channelInfosInput[i].name;
+
+ if ( !CheckSampleTypeSupportedForCHMixing ( channelInfosInput[i].type
) )
+ {
+ bInputChMixingSupported = false;
+ }
}

// query channel infos for all available output channels
@@ -166,6 +179,32 @@
}
}

+ // special case with 4 input channels: support adding channels
+ if ( ( lNumInChan == 4 ) && bInputChMixingSupported )
+ {
+ // add four mixed channels (i.e. 4 normal, 4 mixed channels)
+ lNumInChanPlusAddChan = 8;
+
+ for ( int iCh = 0; iCh < lNumInChanPlusAddChan; iCh++ )
+ {
+ int iSelCH, iSelAddCH;
+
+ GetSelCHAndAddCH ( iCh, lNumInChan, iSelCH, iSelAddCH );
+
+ if ( iSelAddCH >= 0 )
+ {
+ // for mixed channels, show both audio channel names to be
mixed
+ channelInputName[iCh] =
+ channelInputName[iSelCH] + " + " +
channelInputName[iSelAddCH];
+ }
+ }
+ }
+ else
+ {
+ // regular case: no mixing input channels used
+ lNumInChanPlusAddChan = lNumInChan;
+ }
+
// everything is ok, return empty string for "no error" case
return "";
}
@@ -173,8 +212,7 @@
void CSound::SetLeftInputChannel ( const int iNewChan )
{
// apply parameter after input parameter check
- if ( ( iNewChan >= 0 ) && ( iNewChan < lNumInChan ) &&
- ( iNewChan != vSelectedInputChannels[1] ) )
+ if ( ( iNewChan >= 0 ) && ( iNewChan < lNumInChanPlusAddChan ) )
{
vSelectedInputChannels[0] = iNewChan;
}
@@ -183,8 +221,7 @@
void CSound::SetRightInputChannel ( const int iNewChan )
{
// apply parameter after input parameter check
- if ( ( iNewChan >= 0 ) && ( iNewChan < lNumInChan ) &&
- ( iNewChan != vSelectedInputChannels[0] ) )
+ if ( ( iNewChan >= 0 ) && ( iNewChan < lNumInChanPlusAddChan ) )
{
vSelectedInputChannels[1] = iNewChan;
}
@@ -193,8 +230,7 @@
void CSound::SetLeftOutputChannel ( const int iNewChan )
{
// apply parameter after input parameter check
- if ( ( iNewChan >= 0 ) && ( iNewChan < lNumOutChan ) &&
- ( iNewChan != vSelectedOutputChannels[1] ) )
+ if ( ( iNewChan >= 0 ) && ( iNewChan < lNumOutChan ) )
{
vSelectedOutputChannels[0] = iNewChan;
}
@@ -203,8 +239,7 @@
void CSound::SetRightOutputChannel ( const int iNewChan )
{
// apply parameter after input parameter check
- if ( ( iNewChan >= 0 ) && ( iNewChan < lNumOutChan ) &&
- ( iNewChan != vSelectedOutputChannels[0] ) )
+ if ( ( iNewChan >= 0 ) && ( iNewChan < lNumOutChan ) )
{
vSelectedOutputChannels[1] = iNewChan;
}
@@ -323,8 +358,7 @@
{
// get the actual sound card buffer size which is supported
// by the audio hardware
- iASIOBufferSizeMono =
- GetActualBufferSize ( iNewPrefMonoBufferSize );
+ iASIOBufferSizeMono = GetActualBufferSize ( iNewPrefMonoBufferSize );

// init base class
CSoundBase::Init ( iASIOBufferSizeMono );
@@ -342,26 +376,26 @@
// dispose old buffers (if any)
ASIODisposeBuffers();

- // init buffer infos, we always want to have two input and
- // two output channels
- for ( int i = 0; i < NUM_IN_OUT_CHANNELS; i++ )
+ // prepare input channels
+ for ( int i = 0; i < lNumInChan; i++ )
{
- // prepare input channels
bufferInfos[i].isInput = ASIOTrue;
- bufferInfos[i].channelNum = vSelectedInputChannels[i];
+ bufferInfos[i].channelNum = i;
bufferInfos[i].buffers[0] = 0;
bufferInfos[i].buffers[1] = 0;
+ }

- // prepare output channels
- bufferInfos[NUM_IN_OUT_CHANNELS + i].isInput = ASIOFalse;
- bufferInfos[NUM_IN_OUT_CHANNELS + i].channelNum =
vSelectedOutputChannels[i];
- bufferInfos[NUM_IN_OUT_CHANNELS + i].buffers[0] = 0;
- bufferInfos[NUM_IN_OUT_CHANNELS + i].buffers[1] = 0;
+ // prepare output channels
+ for ( int i = 0; i < lNumOutChan; i++ )
+ {
+ bufferInfos[lNumInChan + i].isInput = ASIOFalse;
+ bufferInfos[lNumInChan + i].channelNum = i;
+ bufferInfos[lNumInChan + i].buffers[0] = 0;
+ bufferInfos[lNumInChan + i].buffers[1] = 0;
}

- ASIOCreateBuffers ( bufferInfos,
- 2 /* in/out */ * NUM_IN_OUT_CHANNELS /* stereo */,
- iASIOBufferSizeMono, &asioCallbacks );
+ ASIOCreateBuffers ( bufferInfos, lNumInChan + lNumOutChan,
+ iASIOBufferSizeMono, &asioCallbacks );

// query the latency of the driver
long lInputLatency = 0;
@@ -420,6 +454,7 @@
vSelectedInputChannels ( NUM_IN_OUT_CHANNELS ),
vSelectedOutputChannels ( NUM_IN_OUT_CHANNELS ),
lNumInChan ( 0 ),
+ lNumInChanPlusAddChan ( 0 ),
lNumOutChan ( 0 ),
dInOutLatencyMs ( 0.0 ) // "0.0" means that no latency value is
available
{
@@ -515,12 +550,20 @@
( SamType == ASIOSTInt32MSB24 ) );
}

+bool CSound::CheckSampleTypeSupportedForCHMixing ( const ASIOSampleType
SamType )
+{
+ // check for supported sample types for audio channel mixing (see
bufferSwitch)
+ return ( ( SamType == ASIOSTInt16LSB ) ||
+ ( SamType == ASIOSTInt24LSB ) ||
+ ( SamType == ASIOSTInt32LSB ) );
+}
+
void CSound::bufferSwitch ( long index, ASIOBool )
{
int iCurSample;

// get references to class members
- int& iASIOBufferSizeMono = pSound->iASIOBufferSizeMono;
+ int& iASIOBufferSizeMono = pSound->iASIOBufferSizeMono;
CVector<int16_t>& vecsTmpAudioSndCrdStereo =
pSound->vecsTmpAudioSndCrdStereo;

// perform the processing for input and output
@@ -529,49 +572,88 @@
// CAPTURE
-------------------------------------------------------------
for ( int i = 0; i < NUM_IN_OUT_CHANNELS; i++ )
{
- const int iInChNum = i;
+ int iSelCH, iSelAddCH;
+
+ GetSelCHAndAddCH ( pSound->vSelectedInputChannels[i],
pSound->lNumInChan,
+ iSelCH, iSelAddCH );

// copy new captured block in thread transfer buffer (copy
// mono data interleaved in stereo buffer)
- switch (
pSound->channelInfosInput[pSound->vSelectedInputChannels[i]].type )
+ switch ( pSound->channelInfosInput[iSelCH].type )
{
case ASIOSTInt16LSB:
{
// no type conversion required, just copy operation
- int16_t* pASIOBuf =
- static_cast<int16_t*> (
pSound->bufferInfos[i].buffers[index] );
+ int16_t* pASIOBuf = static_cast<int16_t*> (
pSound->bufferInfos[iSelCH].buffers[index] );

for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
- pASIOBuf[iCurSample];
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
pASIOBuf[iCurSample];
+ }
+
+ if ( iSelAddCH >= 0 )
+ {
+ // mix input channels case:
+ int16_t* pASIOBufAdd = static_cast<int16_t*> (
pSound->bufferInfos[iSelAddCH].buffers[index] );
+
+ for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
+ {
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
+ Double2Short ( (double) vecsTmpAudioSndCrdStereo[2
* iCurSample + i] +
+ (double) pASIOBufAdd[iCurSample] );
+ }
}
break;
}

case ASIOSTInt24LSB:
-// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
int iCurSam = 0;
- memcpy ( &iCurSam, ( (char*)
pSound->bufferInfos[i].buffers[index] ) + iCurSample * 3, 3 );
+ memcpy ( &iCurSam, ( (char*)
pSound->bufferInfos[iSelCH].buffers[index] ) + iCurSample * 3, 3 );
iCurSam >>= 8;

- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
- static_cast<int16_t> ( iCurSam );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( iCurSam );
+ }
+
+ if ( iSelAddCH >= 0 )
+ {
+ // mix input channels case:
+ for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
+ {
+ int iCurSam = 0;
+ memcpy ( &iCurSam, ( (char*)
pSound->bufferInfos[iSelAddCH].buffers[index] ) + iCurSample * 3, 3 );
+ iCurSam >>= 8;
+
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
+ Double2Short ( (double) vecsTmpAudioSndCrdStereo[2
* iCurSample + i] +
+ (double) static_cast<int16_t> (
iCurSam ) );
+ }
}
break;

case ASIOSTInt32LSB:
{
- int32_t* pASIOBuf =
- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] );
+ int32_t* pASIOBuf = static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] );

for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( pASIOBuf[iCurSample] >> 16 );
}
+
+ if ( iSelAddCH >= 0 )
+ {
+ // mix input channels case:
+ int32_t* pASIOBufAdd = static_cast<int32_t*> (
pSound->bufferInfos[iSelAddCH].buffers[index] );
+
+ for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
+ {
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
+ Double2Short ( (double) vecsTmpAudioSndCrdStereo[2
* iCurSample + i] +
+ (double) static_cast<int16_t> (
pASIOBufAdd[iCurSample] >> 16 ) );
+ }
+ }
break;
}

@@ -579,9 +661,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( static_cast<float*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] *
_MAXSHORT );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] * _MAXSHORT );
}
break;

@@ -589,9 +671,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( static_cast<double*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] *
_MAXSHORT );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] * _MAXSHORT );
}
break;

@@ -599,9 +681,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] &
0xFFFF );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] & 0xFFFF );
}
break;

@@ -609,9 +691,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( ( static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] &
0x3FFFF ) >> 2 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] & 0x3FFFF ) >> 2 );
}
break;

@@ -619,9 +701,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( ( static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] &
0xFFFFF ) >> 4 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] & 0xFFFFF ) >> 4 );
}
break;

@@ -629,9 +711,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( ( static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] &
0xFFFFFF ) >> 8 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] & 0xFFFFFF ) >> 8 );
}
break;

@@ -640,9 +722,9 @@
// flip bits
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
Flip16Bits ( ( static_cast<int16_t*> (
- pSound->bufferInfos[i].buffers[index] ) )[iCurSample]
);
+ pSound->bufferInfos[iSelCH].buffers[index] )
)[iCurSample] );
}
break;

@@ -653,9 +735,9 @@
// because the bits are flipped, we do not have to perform
the
// shift by 8 bits
int iCurSam = 0;
- memcpy ( &iCurSam, ( (char*)
pSound->bufferInfos[i].buffers[index] ) + iCurSample * 3, 3 );
+ memcpy ( &iCurSam, ( (char*)
pSound->bufferInfos[iSelCH].buffers[index] ) + iCurSample * 3, 3 );

- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
Flip16Bits ( static_cast<int16_t> ( iCurSam ) );
}
break;
@@ -665,9 +747,9 @@
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
// flip bits and convert to 16 bit
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( Flip32Bits (
static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
16 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) >> 16 );
}
break;

@@ -675,10 +757,10 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( static_cast<float> (
Flip32Bits ( static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
) * _MAXSHORT );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) ) * _MAXSHORT );
}
break;

@@ -686,10 +768,10 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( static_cast<double> (
Flip64Bits ( static_cast<int64_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
) * _MAXSHORT );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) ) * _MAXSHORT );
}
break;

@@ -697,9 +779,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( Flip32Bits (
static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
& 0xFFFF );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) & 0xFFFF );
}
break;

@@ -707,9 +789,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( ( Flip32Bits (
static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
& 0x3FFFF ) >> 2 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) & 0x3FFFF ) >> 2 );
}
break;

@@ -717,9 +799,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( ( Flip32Bits (
static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
& 0xFFFFF ) >> 4 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) & 0xFFFFF ) >> 4 );
}
break;

@@ -727,9 +809,9 @@
// NOT YET TESTED
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iInChNum] =
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] =
static_cast<int16_t> ( ( Flip32Bits (
static_cast<int32_t*> (
- pSound->bufferInfos[i].buffers[index] )[iCurSample] )
& 0xFFFFFF ) >> 8 );
+ pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] ) & 0xFFFFFF ) >> 8 );
}
break;
}
@@ -739,24 +821,22 @@
pSound->ProcessCallback ( vecsTmpAudioSndCrdStereo );

// PLAYBACK
------------------------------------------------------------
- for ( int i = NUM_IN_OUT_CHANNELS; i < 2 * NUM_IN_OUT_CHANNELS; i++ )
+ for ( int i = 0; i < NUM_IN_OUT_CHANNELS; i++ )
{
- const int iOutChNum = i - NUM_IN_OUT_CHANNELS;
+ const int iSelCH = pSound->lNumInChan +
pSound->vSelectedOutputChannels[i];

// copy data from sound card in output buffer (copy
// interleaved stereo data in mono sound card buffer)
- switch (
pSound->channelInfosOutput[pSound->vSelectedOutputChannels[iOutChNum]].type )
+ switch (
pSound->channelInfosOutput[pSound->vSelectedOutputChannels[i]].type )
{
case ASIOSTInt16LSB:
{
// no type conversion required, just copy operation
- int16_t* pASIOBuf =
- static_cast<int16_t*> (
pSound->bufferInfos[i].buffers[index] );
+ int16_t* pASIOBuf = static_cast<int16_t*> (
pSound->bufferInfos[iSelCH].buffers[index] );

for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- pASIOBuf[iCurSample] =
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum];
+ pASIOBuf[iCurSample] = vecsTmpAudioSndCrdStereo[2 *
iCurSample + i];
}
break;
}
@@ -767,24 +847,23 @@
{
// convert current sample in 24 bit format
int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

iCurSam <<= 8;

- memcpy ( ( (char*) pSound->bufferInfos[i].buffers[index] )
+ iCurSample * 3, &iCurSam, 3 );
+ memcpy ( ( (char*)
pSound->bufferInfos[iSelCH].buffers[index] ) + iCurSample * 3, &iCurSam, 3 );
}
break;

case ASIOSTInt32LSB:
{
- int32_t* pASIOBuf =
- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] );
+ int32_t* pASIOBuf = static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] );

for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

pASIOBuf[iCurSample] = ( iCurSam << 16 );
}
@@ -796,9 +875,9 @@
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
const float fCurSam = static_cast<float> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<float*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<float*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
fCurSam / _MAXSHORT;
}
break;
@@ -808,9 +887,9 @@
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
const double fCurSam = static_cast<double> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<double*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<double*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
fCurSam / _MAXSHORT;
}
break;
@@ -821,9 +900,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
iCurSam;
}
break;
@@ -834,9 +913,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
( iCurSam << 2 );
}
break;
@@ -847,9 +926,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
( iCurSam << 4 );
}
break;
@@ -860,9 +939,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
( iCurSam << 8 );
}
break;
@@ -872,8 +951,8 @@
// flip bits
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
- ( (int16_t*) pSound->bufferInfos[i].buffers[index]
)[iCurSample] =
- Flip16Bits ( vecsTmpAudioSndCrdStereo[2 * iCurSample +
iOutChNum] );
+ ( (int16_t*) pSound->bufferInfos[iSelCH].buffers[index]
)[iCurSample] =
+ Flip16Bits ( vecsTmpAudioSndCrdStereo[2 * iCurSample +
i] );
}
break;

@@ -884,9 +963,9 @@
// because the bits are flipped, we do not have to perform
the
// shift by 8 bits
int32_t iCurSam = static_cast<int32_t> ( Flip16Bits (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] )
);
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] ) );

- memcpy ( ( (char*) pSound->bufferInfos[i].buffers[index] )
+ iCurSample * 3, &iCurSam, 3 );
+ memcpy ( ( (char*)
pSound->bufferInfos[iSelCH].buffers[index] ) + iCurSample * 3, &iCurSam, 3 );
}
break;

@@ -896,9 +975,9 @@
{
// convert to 32 bit and flip bits
int iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
Flip32Bits ( iCurSam << 16 );
}
break;
@@ -908,9 +987,9 @@
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
const float fCurSam = static_cast<float> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<float*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<float*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
static_cast<float> ( Flip32Bits ( static_cast<int32_t>
(
fCurSam / _MAXSHORT ) ) );
}
@@ -921,9 +1000,9 @@
for ( iCurSample = 0; iCurSample < iASIOBufferSizeMono;
iCurSample++ )
{
const double fCurSam = static_cast<double> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<float*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<float*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
static_cast<double> ( Flip64Bits (
static_cast<int64_t> (
fCurSam / _MAXSHORT ) ) );
}
@@ -935,9 +1014,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
Flip32Bits ( iCurSam );
}
break;
@@ -948,9 +1027,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
Flip32Bits ( iCurSam << 2 );
}
break;
@@ -961,9 +1040,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
Flip32Bits ( iCurSam << 4 );
}
break;
@@ -974,9 +1053,9 @@
{
// convert to 32 bit
const int32_t iCurSam = static_cast<int32_t> (
- vecsTmpAudioSndCrdStereo[2 * iCurSample + iOutChNum] );
+ vecsTmpAudioSndCrdStereo[2 * iCurSample + i] );

- static_cast<int32_t*> (
pSound->bufferInfos[i].buffers[index] )[iCurSample] =
+ static_cast<int32_t*> (
pSound->bufferInfos[iSelCH].buffers[index] )[iCurSample] =
Flip32Bits ( iCurSam << 8 );
}
break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Jamulus3.4.2/windows/sound.h
new/Jamulus3.4.3/windows/sound.h
--- old/Jamulus3.4.2/windows/sound.h 2017-08-11 14:25:05.000000000 +0200
+++ new/Jamulus3.4.3/windows/sound.h 2018-05-17 19:39:34.000000000 +0200
@@ -1,5 +1,5 @@

/******************************************************************************\
- * Copyright (c) 2004-2016
+ * Copyright (c) 2004-2018
*
* Author(s):
* Volker Fischer
@@ -58,8 +58,8 @@
virtual void OpenDriverSetup() { ASIOControlPanel(); }

// channel selection
- virtual int GetNumInputChannels() { return static_cast<int> (
lNumInChan ); }
- virtual QString GetInputChannelName ( const int iDiD ) { return
channelInfosInput[iDiD].name; }
+ virtual int GetNumInputChannels() { return static_cast<int> (
lNumInChanPlusAddChan ); }
+ virtual QString GetInputChannelName ( const int iDiD ) { return
channelInputName[iDiD]; }
virtual void SetLeftInputChannel ( const int iNewChan );
virtual void SetRightInputChannel ( const int iNewChan );
virtual int GetLeftInputChannel() { return vSelectedInputChannels[0];
}
@@ -80,12 +80,36 @@
int GetActualBufferSize ( const int iDesiredBufferSizeMono );
QString CheckDeviceCapabilities();
bool CheckSampleTypeSupported ( const ASIOSampleType SamType );
+ bool CheckSampleTypeSupportedForCHMixing ( const
ASIOSampleType SamType );
void ResetChannelMapping();

+ static void GetSelCHAndAddCH ( const int iSelCH, const int iNumInChan,
+ int& iSelCHOut, int& iSelAddCHOut
)
+ {
+ // we have a mixed channel setup
+ // definitions:
+ // - mixed channel setup only for 4 physical inputs:
+ // SelCH == 4: Ch 0 + Ch 2
+ // SelCh == 5: Ch 0 + Ch 3
+ // SelCh == 6: Ch 1 + Ch 2
+ // SelCh == 7: Ch 1 + Ch 3
+ if ( iSelCH >= iNumInChan )
+ {
+ iSelAddCHOut = ( ( iSelCH - iNumInChan ) % 2 ) + 2;
+ iSelCHOut = ( iSelCH - iNumInChan ) / 2;
+ }
+ else
+ {
+ iSelAddCHOut = -1;
+ iSelCHOut = iSelCH;
+ }
+ }
+
int iASIOBufferSizeMono;
int iASIOBufferSizeStereo;

long lNumInChan;
+ long lNumInChanPlusAddChan; // includes additional "added"
channels
long lNumOutChan;
double dInOutLatencyMs;
CVector<int> vSelectedInputChannels;
@@ -111,8 +135,9 @@

// ASIO stuff
ASIODriverInfo driverInfo;
- ASIOBufferInfo bufferInfos[2 * NUM_IN_OUT_CHANNELS]; // for input and
output buffers -> "2 *"
+ ASIOBufferInfo bufferInfos[2 * MAX_NUM_IN_OUT_CHANNELS]; // for input
and output buffers -> "2 *"
ASIOChannelInfo channelInfosInput[MAX_NUM_IN_OUT_CHANNELS];
+ QString channelInputName[MAX_NUM_IN_OUT_CHANNELS];
ASIOChannelInfo channelInfosOutput[MAX_NUM_IN_OUT_CHANNELS];
bool bASIOPostOutput;
ASIOCallbacks asioCallbacks;



< Previous Next >
This Thread
  • No further messages