mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
DSP: added automatic alsa test.
Should fix issue 1403 git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4274 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -243,9 +243,9 @@ env['HAVE_BLUEZ'] = conf.CheckPKG('bluez')
|
|||||||
|
|
||||||
# needed for sound
|
# needed for sound
|
||||||
env['HAVE_AO'] = conf.CheckPKG('ao')
|
env['HAVE_AO'] = conf.CheckPKG('ao')
|
||||||
|
|
||||||
# Sound lib
|
|
||||||
env['HAVE_OPENAL'] = conf.CheckPKG('openal')
|
env['HAVE_OPENAL'] = conf.CheckPKG('openal')
|
||||||
|
env['HAVE_ALSA'] = conf.CheckPKG('alsa')
|
||||||
|
|
||||||
|
|
||||||
if sys.platform != 'darwin':
|
if sys.platform != 'darwin':
|
||||||
# needed for mic
|
# needed for mic
|
||||||
@ -306,6 +306,7 @@ conf.Define('HAVE_SDL', env['HAVE_SDL'])
|
|||||||
conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
|
conf.Define('HAVE_BLUEZ', env['HAVE_BLUEZ'])
|
||||||
conf.Define('HAVE_AO', env['HAVE_AO'])
|
conf.Define('HAVE_AO', env['HAVE_AO'])
|
||||||
conf.Define('HAVE_OPENAL', env['HAVE_OPENAL'])
|
conf.Define('HAVE_OPENAL', env['HAVE_OPENAL'])
|
||||||
|
conf.Define('HAVE_ALSA', env['HAVE_ALSA'])
|
||||||
conf.Define('HAVE_WX', env['HAVE_WX'])
|
conf.Define('HAVE_WX', env['HAVE_WX'])
|
||||||
conf.Define('USE_WX', env['USE_WX'])
|
conf.Define('USE_WX', env['USE_WX'])
|
||||||
conf.Define('HAVE_X11', env['HAVE_X11'])
|
conf.Define('HAVE_X11', env['HAVE_X11'])
|
||||||
|
@ -119,9 +119,10 @@ bool AlsaSound::AlsaInit()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is weird - if I do pass in a pointer to a variable, like the header wants me to,
|
// This is weird - if I do pass in a pointer to a variable, like the header
|
||||||
// the sample rate goes mad. It seems that the alsa header doesn't match the library we link in :(
|
// wants me to, the sample rate goes mad. It seems that the alsa header
|
||||||
// If anyone know why, i'd appreciate if you let me know - ector.
|
// doesn't match the library we link in :( If anyone know why, i'd
|
||||||
|
// appreciate if you let me know - ector.
|
||||||
err = snd_pcm_hw_params_set_rate_near(handle, hwparams, (unsigned int *)sample_rate, &dir);
|
err = snd_pcm_hw_params_set_rate_near(handle, hwparams, (unsigned int *)sample_rate, &dir);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
{
|
{
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# -*- python -*-
|
# -*- python -*-
|
||||||
|
|
||||||
Import('env')
|
Import('env')
|
||||||
@ -18,7 +19,7 @@ if acenv['HAVE_OPENAL']:
|
|||||||
if acenv['HAVE_AO']:
|
if acenv['HAVE_AO']:
|
||||||
files += [ 'AOSoundStream.cpp' ]
|
files += [ 'AOSoundStream.cpp' ]
|
||||||
|
|
||||||
# TODO: make conditional?
|
if acenv['HAVE_ALSA']:
|
||||||
files += [ 'AlsaSoundStream.cpp' ]
|
files += [ 'AlsaSoundStream.cpp' ]
|
||||||
|
|
||||||
acenv.StaticLibrary(env['local_libs'] + 'audiocommon', files)
|
acenv.StaticLibrary(env['local_libs'] + 'audiocommon', files)
|
||||||
|
@ -111,11 +111,6 @@
|
|||||||
#define POSIX 1
|
#define POSIX 1
|
||||||
#define MAX_PATH 260
|
#define MAX_PATH 260
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#define HAVE_ALSA 0
|
|
||||||
#else
|
|
||||||
#define HAVE_ALSA 1
|
|
||||||
#endif
|
|
||||||
// Windows compatibility
|
// Windows compatibility
|
||||||
#define __forceinline inline __attribute__((always_inline))
|
#define __forceinline inline __attribute__((always_inline))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user