diff options
author | Chris Robinson <[email protected]> | 2010-05-31 19:00:33 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-05-31 19:00:33 -0700 |
commit | da1dee351dce20da4c46d0fbdf3054196359dee2 (patch) | |
tree | 1362f3ffd66b97980e04dddeffe67f880088124b | |
parent | 694e9a5fec3aa9695e168480253c21486840d35c (diff) |
Update device naming to be more apparent about the device being used
-rw-r--r-- | Alc/alsa.c | 11 | ||||
-rw-r--r-- | Alc/dsound.c | 2 | ||||
-rw-r--r-- | Alc/oss.c | 9 | ||||
-rw-r--r-- | Alc/portaudio.c | 9 | ||||
-rw-r--r-- | Alc/pulseaudio.c | 8 | ||||
-rw-r--r-- | Alc/solaris.c | 2 | ||||
-rw-r--r-- | Alc/winmm.c | 2 |
7 files changed, 19 insertions, 24 deletions
@@ -114,7 +114,7 @@ MAKE_FUNC(snd_card_next); #undef MAKE_FUNC -static const ALCchar alsaDevice[] = "ALSA Software"; +static const ALCchar alsaDevice[] = "ALSA Default"; static DevMap *allDevNameMap; static ALuint numDevNames; static DevMap *allCaptureDevNameMap; @@ -231,9 +231,7 @@ static DevMap *probe_devices(snd_pcm_stream_t stream, ALuint *count) AL_PRINT("Failed to find a card: %s\n", psnd_strerror(err)); DevList = malloc(sizeof(DevMap) * 1); - DevList[0].name = strdup((stream == SND_PCM_STREAM_PLAYBACK) ? - "ALSA Software on default" : - "ALSA Capture on default"); + DevList[0].name = strdup("ALSA Default"); idx = 1; while(card >= 0) { @@ -276,9 +274,8 @@ static DevMap *probe_devices(snd_pcm_stream_t stream, ALuint *count) DevList = temp; cname = psnd_ctl_card_info_get_name(info); dname = psnd_pcm_info_get_name(pcminfo); - snprintf(name, sizeof(name), "ALSA %s on %s [%s] (hw:%d,%d)", - ((stream == SND_PCM_STREAM_PLAYBACK) ? - "Software" : "Capture"), cname, dname, card, dev); + snprintf(name, sizeof(name), "%s [%s] (hw:%d,%d) via ALSA", + cname, dname, card, dev); DevList[idx].name = strdup(name); DevList[idx].card = card; DevList[idx].dev = dev; diff --git a/Alc/dsound.c b/Alc/dsound.c index 704fb909..f1229fdd 100644 --- a/Alc/dsound.c +++ b/Alc/dsound.c @@ -123,7 +123,7 @@ static BOOL CALLBACK DSoundEnumDevices(LPGUID guid, LPCSTR desc, LPCSTR drvname, { DeviceList = temp; - snprintf(str, sizeof(str), "DirectSound Software on %s", desc); + snprintf(str, sizeof(str), "%s via DirectSound", desc); DeviceList[NumDevices].name = strdup(str); DeviceList[NumDevices].guid = *guid; @@ -47,8 +47,7 @@ #define SOUND_MIXER_WRITE MIXER_WRITE #endif -static const ALCchar oss_device[] = "OSS Software"; -static const ALCchar oss_device_capture[] = "OSS Capture"; +static const ALCchar oss_device[] = "OSS Default"; typedef struct { int fd; @@ -324,8 +323,8 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName) strncpy(driver, GetConfigValue("oss", "capture", "/dev/dsp"), sizeof(driver)-1); driver[sizeof(driver)-1] = 0; if(!deviceName) - deviceName = oss_device_capture; - else if(strcmp(deviceName, oss_device_capture) != 0) + deviceName = oss_device; + else if(strcmp(deviceName, oss_device) != 0) return ALC_FALSE; data = (oss_data*)calloc(1, sizeof(oss_data)); @@ -513,6 +512,6 @@ void alc_oss_probe(int type) struct stat buf; if(stat(GetConfigValue("oss", "capture", "/dev/dsp"), &buf) == 0) #endif - AppendCaptureDeviceList(oss_device_capture); + AppendCaptureDeviceList(oss_device); } } diff --git a/Alc/portaudio.c b/Alc/portaudio.c index 561f7470..2b8e0fa4 100644 --- a/Alc/portaudio.c +++ b/Alc/portaudio.c @@ -46,8 +46,7 @@ MAKE_FUNC(Pa_GetStreamInfo); #undef MAKE_FUNC -static const ALCchar pa_device[] = "PortAudio Software"; -static const ALCchar pa_capture[] = "PortAudio Capture"; +static const ALCchar pa_device[] = "PortAudio Default"; void *pa_load(void) @@ -281,8 +280,8 @@ static ALCboolean pa_open_capture(ALCdevice *device, const ALCchar *deviceName) PaError err; if(!deviceName) - deviceName = pa_capture; - else if(strcmp(deviceName, pa_capture) != 0) + deviceName = pa_device; + else if(strcmp(deviceName, pa_device) != 0) return ALC_FALSE; if(!pa_load()) @@ -435,5 +434,5 @@ void alc_pa_probe(int type) else if(type == ALL_DEVICE_PROBE) AppendAllDeviceList(pa_device); else if(type == CAPTURE_DEVICE_PROBE) - AppendCaptureDeviceList(pa_capture); + AppendCaptureDeviceList(pa_device); } diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index c197e07c..46f425ed 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -143,7 +143,7 @@ typedef struct { } DevMap; -static const ALCchar pulse_device[] = "PulseAudio Software"; +static const ALCchar pulse_device[] = "PulseAudio Default"; static DevMap *allDevNameMap; static ALuint numDevNames; static DevMap *allCaptureDevNameMap; @@ -424,7 +424,7 @@ static void sink_device_callback(pa_context *context, const pa_sink_info *info, if(temp) { char str[256]; - snprintf(str, sizeof(str), "PulseAudio on %s", info->description); + snprintf(str, sizeof(str), "%s via PulseAudio", info->description); allDevNameMap = temp; allDevNameMap[numDevNames].name = strdup(str); @@ -450,7 +450,7 @@ static void source_device_callback(pa_context *context, const pa_source_info *in if(temp) { char str[256]; - snprintf(str, sizeof(str), "PulseAudio on %s", info->description); + snprintf(str, sizeof(str), "%s via PulseAudio", info->description); allCaptureDevNameMap = temp; allCaptureDevNameMap[numCaptureDevNames].name = strdup(str); @@ -590,7 +590,7 @@ static void probe_devices(ALboolean capture) else { allCaptureDevNameMap = malloc(sizeof(DevMap) * 1); - allCaptureDevNameMap[0].name = strdup("PulseAudio Capture"); + allCaptureDevNameMap[0].name = strdup("PulseAudio Default"); allCaptureDevNameMap[0].device_name = NULL; numCaptureDevNames = 1; } diff --git a/Alc/solaris.c b/Alc/solaris.c index 50c16a06..444cab58 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -37,7 +37,7 @@ #include <sys/audioio.h> -static const ALCchar solaris_device[] = "Solaris Software"; +static const ALCchar solaris_device[] = "Solaris Default"; typedef struct { int fd; diff --git a/Alc/winmm.c b/Alc/winmm.c index d20a0fb8..6d43c734 100644 --- a/Alc/winmm.c +++ b/Alc/winmm.c @@ -70,7 +70,7 @@ static void ProbeDevices(void) if(waveInGetDevCaps(i, &WaveInCaps, sizeof(WAVEINCAPS)) == MMSYSERR_NOERROR) { char name[128]; - snprintf(name, sizeof(name), "WaveIn on %s", WaveInCaps.szPname); + snprintf(name, sizeof(name), "%s via WaveIn", WaveInCaps.szPname); CaptureDeviceList[i] = strdup(name); } } |