mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-14 13:56:00 +00:00
Added support for ALSA dmix audio output (thanks @sylware!)
Fixes https://github.com/libsdl-org/SDL/issues/8577
This commit is contained in:

committed by
Ryan C. Gordon

parent
3fa0537565
commit
76e7bc4c04
File diff suppressed because it is too large
Load Diff
@@ -27,16 +27,21 @@
|
|||||||
|
|
||||||
#include "../SDL_sysaudio.h"
|
#include "../SDL_sysaudio.h"
|
||||||
|
|
||||||
|
#define SDL_AUDIO_ALSA__CHMAP_CHANS_N_MAX 8
|
||||||
|
#define SDL_AUDIO_ALSA__SDL_CHMAPS_N 9 // from 0 channels to 8 channels
|
||||||
struct SDL_PrivateAudioData
|
struct SDL_PrivateAudioData
|
||||||
{
|
{
|
||||||
// The audio device handle
|
// The audio device handle
|
||||||
snd_pcm_t *pcm_handle;
|
snd_pcm_t *pcm;
|
||||||
|
|
||||||
// Raw mixing buffer
|
// Raw mixing buffer
|
||||||
Uint8 *mixbuf;
|
Uint8 *mixbuf;
|
||||||
|
|
||||||
// swizzle function
|
// swizzle function
|
||||||
void (*swizzle_func)(SDL_AudioDevice *_this, void *buffer, Uint32 bufferlen);
|
void (*swizzle_func)(SDL_AudioDevice *_this, void *buffer, Uint32 bufferlen);
|
||||||
|
// Up to a channel map of 8 channels, will define the sample indexes into the alsa frame
|
||||||
|
// from a sdl sample index.
|
||||||
|
int swizzle_map[SDL_AUDIO_ALSA__CHMAP_CHANS_N_MAX];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SDL_ALSA_audio_h_
|
#endif // SDL_ALSA_audio_h_
|
||||||
|
Reference in New Issue
Block a user