Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
ba908411
Commit
ba908411
authored
Jan 11, 2006
by
jpbl
Browse files
trying to get rid of pacpp
parent
f17cfdd6
Changes
5
Hide whitespace changes
Inline
Side-by-side
libs/portaudio/Makefile.am
View file @
ba908411
noinst_LTLIBRARIES
=
libportaudio.la
libportaudio_la_CFLAGS
=
$(PORTAUDIO_CFLAGS)
-Ipa_common
/
libportaudio_la_CFLAGS
=
$(PORTAUDIO_CFLAGS)
-Ipa_common
/
libportaudio_la_LIBADD
=
$(PORTAUDIO_LIBS)
libportaudio_la_CXXFLAGS
=
$(PORTAUDIO_CXXFLAGS)
libportaudio_la_CPPFLAGS
=
$(PORTAUDIO_CPPFLAGS)
...
...
src/audio/OpenAL/Makefile.am
View file @
ba908411
...
...
@@ -17,12 +17,12 @@ libsflaudio_la_SOURCES = \
SFLAudio.hpp
\
Source.hpp
AM_CPPFLAGS
=
$(PORTAUDIO_CFLAGS)
-I
../pacpp/include
-I
$(top_srcdir)
/libs/portaudio/pa_common
-I
$(top_srcdir)
/libs/
AM_CPPFLAGS
=
$(PORTAUDIO_CFLAGS)
-I
$(top_srcdir)
/libs/portaudio/pa_common
-I
$(top_srcdir)
/libs/
AM_CXXFLAGS
=
$(PORTAUDIO_CXXFLAGS)
-I
$(top_srcdir)
/libs/
AM_LDFLAGS
=
-L
$(top_srcdir)
/libs/portaudio/
LIBADD
=
$(PORTAUDIO_LIBS)
-lportaudio
-lopenal
LDADD
=
libsflaudio.la
$(PORTAUDIO_LIBS)
-lopenal
../pacpp/source/portaudiocpp/libportaudiocpp.la
-lportaudio
LDADD
=
libsflaudio.la
$(PORTAUDIO_LIBS)
-lopenal
-lportaudio
example01_SOURCES
=
example01.cpp
...
...
src/audio/OpenAL/OpenALDevice.hpp
View file @
ba908411
...
...
@@ -30,6 +30,7 @@ namespace SFLAudio
{
public:
OpenALDevice
();
~
OpenALDevice
();
virtual
bool
load
();
virtual
void
unload
();
virtual
Context
*
createContext
();
...
...
src/audio/OpenAL/PortAudioLayer.cpp
View file @
ba908411
...
...
@@ -19,9 +19,7 @@
*/
#include "PortAudioLayer.hpp"
#include "portaudiocpp/Device.hxx"
#include "portaudiocpp/HostApi.hxx"
#include "portaudiocpp/System.hxx"
#include "portaudio.h"
#include "NullDevice.hpp"
...
...
@@ -29,30 +27,54 @@
SFLAudio
::
PortAudioLayer
::
PortAudioLayer
()
:
AudioLayer
(
"portaudio"
)
{
portaudio
::
System
::
i
nitialize
();
Pa_I
nitialize
();
}
SFLAudio
::
PortAudioLayer
::~
PortAudioLayer
()
{
portaudio
::
System
::
t
erminate
();
Pa_T
erminate
();
}
std
::
list
<
std
::
string
>
SFLAudio
::
PortAudioLayer
::
getDevicesNames
()
{
std
::
list
<
std
::
string
>
devices
;
for
(
int
index
=
0
;
index
<
portaudio
::
System
::
instance
().
deviceCount
();
index
++
)
{
portaudio
::
Device
&
device
=
portaudio
::
System
::
instance
().
deviceByIndex
(
index
);
refreshDevices
();
std
::
string
name
(
device
.
hostApi
().
name
());
name
+=
": "
;
name
+=
device
.
name
();
devices
.
push_back
(
name
);
std
::
list
<
std
::
string
>
devices
;
for
(
DevicesType
::
iterator
pos
=
mDevices
.
begin
();
pos
!=
mDevices
.
end
();
pos
++
)
{
devices
.
push_back
(
pos
->
first
);
}
return
devices
;
}
void
SFLAudio
::
PortAudioLayer
::
refreshDevices
()
{
mDevices
.
clear
();
for
(
int
index
=
0
;
index
<
Pa_GetDeviceCount
();
index
++
)
{
const
PaDeviceInfo
*
device
=
NULL
;
const
PaHostApiInfo
*
host
=
NULL
;
device
=
Pa_GetDeviceInfo
(
index
);
if
(
device
!=
NULL
)
{
host
=
Pa_GetHostApiInfo
(
device
->
hostApi
);
}
if
(
device
!=
NULL
&&
host
!=
NULL
)
{
std
::
string
name
(
host
->
name
);
name
+=
": "
;
name
+=
device
->
name
;
mDevices
.
insert
(
std
::
make_pair
(
name
,
index
));
}
}
}
SFLAudio
::
Device
*
SFLAudio
::
PortAudioLayer
::
openDevice
()
{
...
...
src/audio/OpenAL/PortAudioLayer.hpp
View file @
ba908411
...
...
@@ -38,7 +38,11 @@ namespace SFLAudio
virtual
Device
*
openDevice
(
const
std
::
string
&
name
);
private:
std
::
map
<
std
::
string
,
std
::
pair
<
int
,
int
>
>
mDevices
;
virtual
void
refreshDevices
();
private:
typedef
std
::
map
<
std
::
string
,
int
>
DevicesType
;
DevicesType
mDevices
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment