> > Getting rid of PortAudio on Linux does imply finishing the work Matthieu
> > started earlier this year.
>
> I'll ask Matthieu what he thinks need to be done, but I think it's quite
> complete right now.
After a brief check, it's ok. There were some mono-stereo issues, but if I am
not mistakenn they are fixed now that we use the plughw and dmix devices (Or
am I wrong?)
> > Isn't PortAudio also used on Windows still?
>
> Yes, I was thinking about removing it from Linux, so that we don't have to
> different binaries.
Attached patch removes PortAudio support for Linux. From what I understand, we
still need PortAudio on Windows, at least to enumerate devices (haven't had a
look at the phapi side yet).
It builds and runs ok on my Mac, Linux and Windows boxes. If noone objects,
I'll commit this tomorrow.
Aurélien
Index: INSTALL.txt
===================================================================
--- INSTALL.txt (révision 12686)
+++ INSTALL.txt (copie de travail)
@@ -145,11 +145,12 @@
- COPY_DATA_FILES_ON_CONFIGURE: Whether you want CMake to copy data files to
the build dir when running
- GNU/Linux options:
- - OWSOUND_PORTAUDIO_SUPPORT: If ON (the default), use PortAudio. If OFF, use
- Alsa.
- ENABLE_CRASHREPORT: If ON (the default), intercept crashes and provide a
graphical interface to report information to Wengo on crash. If OFF, just quit
and dump core.
+- Windows options:
+ - OWSOUND_PORTAUDIO_SUPPORT: If ON (the default), use PortAudio. If OFF, use
+ WinMM.
### Browsing/editing CMake options
Index: DefineWengoOptions.cmake
===================================================================
--- DefineWengoOptions.cmake (révision 12686)
+++ DefineWengoOptions.cmake (copie de travail)
@@ -7,12 +7,6 @@
option(SIPWRAPPER_BACKEND_PHAPI "PhApi backend for SipWrapper" OFF)
option(IMWRAPPER_BACKEND_MULTI "PhApi and Gaim backend for IMWrapper" ON)
-if (APPLE)
- option(OWSOUND_PORTAUDIO_SUPPORT "Build libsound with PortAudio support" OFF)
-else (APPLE)
- option(OWSOUND_PORTAUDIO_SUPPORT "Build libsound with PortAudio support" ON)
-endif (APPLE)
-
option(LOGGER_ENABLE_EVENT "Enable the event notification in Logger" OFF)
option(PHAPI_VIDEO_SUPPORT "Build phApi with video support" ON)
@@ -46,4 +40,5 @@
if (WIN32)
option(FFMPEG_OLD_VERSION "Use the old version of ffmpeg" OFF)
+ option(OWSOUND_PORTAUDIO_SUPPORT "Build libsound with PortAudio support" ON)
endif (WIN32)
Index: libs/sound/src/AudioDevice.cpp
===================================================================
--- libs/sound/src/AudioDevice.cpp (révision 12712)
+++ libs/sound/src/AudioDevice.cpp (copie de travail)
@@ -26,11 +26,7 @@
#elif defined(OS_MACOSX)
#include "mac/MacAudioDevice.h"
#elif defined(OS_LINUX)
- #if defined(OWSOUND_PORTAUDIO_SUPPORT)
- #include "portaudio/PAAudioDevice.h"
- #else
- #include "linux/LinuxAudioDevice.h"
- #endif
+ #include "linux/LinuxAudioDevice.h"
#else
#error This OS has not been tested
#endif
@@ -77,11 +73,7 @@
#elif defined(OS_MACOSX)
_audioDevicePrivate = new MacAudioDevice(data);
#elif defined(OS_LINUX)
- #if defined(OWSOUND_PORTAUDIO_SUPPORT)
- _audioDevicePrivate = new PAAudioDevice(data);
- #else
- _audioDevicePrivate = new LinuxAudioDevice(data);
- #endif
+ _audioDevicePrivate = new LinuxAudioDevice(data);
#endif
}
Index: libs/sound/src/portaudio/PAAudioDevice.cpp
===================================================================
--- libs/sound/src/portaudio/PAAudioDevice.cpp (révision 12686)
+++ libs/sound/src/portaudio/PAAudioDevice.cpp (copie de travail)
@@ -1,36 +0,0 @@
-/*
- * WengoPhone, a voice over Internet phone
- * Copyright (C) 2004-2006 Wengo
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include "PAAudioDevice.h"
-
-#include <util/String.h>
-
-PAAudioDevice::PAAudioDevice(const StringList & data)
- : AudioDevice() {
-
- _data = data;
-}
-
-std::string PAAudioDevice::getName() const {
- return _data[0];
-}
-
-StringList PAAudioDevice::getData() const {
- return _data;
-}
Index: libs/sound/src/portaudio/PAAudioDevice.h
===================================================================
--- libs/sound/src/portaudio/PAAudioDevice.h (révision 12686)
+++ libs/sound/src/portaudio/PAAudioDevice.h (copie de travail)
@@ -1,44 +0,0 @@
-/*
- * WengoPhone, a voice over Internet phone
- * Copyright (C) 2004-2006 Wengo
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef OWPAAUDIODEVICE_H
-#define OWPAAUDIODEVICE_H
-
-#include <sound/AudioDevice.h>
-
-/**
- * PortAudio implementation of AudioDevice.
- *
- * _data[0] = deviceName
- * _data[1] = deviceId
- * _data[2] = deviceType
- *
- * @author Mathieu Stute
- */
-class PAAudioDevice : public AudioDevice {
-public:
-
- PAAudioDevice(const StringList & data);
-
- std::string getName() const;
-
- StringList getData() const;
-};
-
-#endif //OWPAAUDIODEVICE_H
Index: libs/sound/CMakeLists.txt
===================================================================
--- libs/sound/CMakeLists.txt (révision 12712)
+++ libs/sound/CMakeLists.txt (copie de travail)
@@ -74,33 +74,19 @@
endif (APPLE)
if (LINUX)
- if (OWSOUND_PORTAUDIO_SUPPORT)
- ow_use_private_libraries(
- portaudio
- sndfile
- )
- ow_add_sources(
- src/unix/Sound.cpp
- src/unix/UnixSoundThread.cpp
- src/unix/UnixVolumeControl.cpp
- src/portaudio/AudioDeviceManager.cpp
- src/portaudio/PAAudioDevice.cpp
- )
- else (OWSOUND_PORTAUDIO_SUPPORT)
- ow_use_private_libraries(
- alsa
- sndfile
- )
- ow_add_sources(
- src/linux/AudioDeviceManager.cpp
- src/linux/LinuxAudioDevice.cpp
- src/linux/LinuxVolumeControl.cpp
- src/linux/LinuxSound.cpp
- src/linux/Sound.cpp
- src/linux/alsa_mixer.cpp
- src/linux/alsa_sndfile.cpp
- )
- endif (OWSOUND_PORTAUDIO_SUPPORT)
+ ow_use_private_libraries(
+ alsa
+ sndfile
+ )
+ ow_add_sources(
+ src/linux/AudioDeviceManager.cpp
+ src/linux/LinuxAudioDevice.cpp
+ src/linux/LinuxVolumeControl.cpp
+ src/linux/LinuxSound.cpp
+ src/linux/Sound.cpp
+ src/linux/alsa_mixer.cpp
+ src/linux/alsa_sndfile.cpp
+ )
endif (LINUX)
ow_create_project_binary()
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (révision 12686)
+++ CMakeLists.txt (copie de travail)
@@ -43,12 +43,6 @@
)
endif (WIN32)
-if (LINUX AND OWSOUND_PORTAUDIO_SUPPORT)
- subdirs(
- libs/3rdparty/portaudio
- )
-endif(LINUX AND OWSOUND_PORTAUDIO_SUPPORT)
-
subdirs(
libs/owutil
libs/qtutil
_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel