mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 13:54:49 +00:00 
			
		
		
		
	audio: Changed OnlyHasDefaultInputDevice to OnlyHasDefaultCaptureDevice.
This commit is contained in:
		
							parent
							
								
									761a79788c
								
							
						
					
					
						commit
						9b2a59ef05
					
				| 
						 | 
				
			
			@ -165,7 +165,7 @@ SDL_AudioDetectDevices_Default(void)
 | 
			
		|||
{
 | 
			
		||||
    /* you have to write your own implementation if these assertions fail. */
 | 
			
		||||
    SDL_assert(current_audio.impl.OnlyHasDefaultOutputDevice);
 | 
			
		||||
    SDL_assert(current_audio.impl.OnlyHasDefaultInputDevice || !current_audio.impl.HasCaptureSupport);
 | 
			
		||||
    SDL_assert(current_audio.impl.OnlyHasDefaultCaptureDevice || !current_audio.impl.HasCaptureSupport);
 | 
			
		||||
 | 
			
		||||
    SDL_AddAudioDevice(SDL_FALSE, DEFAULT_OUTPUT_DEVNAME, (void *) ((size_t) 0x1));
 | 
			
		||||
    if (current_audio.impl.HasCaptureSupport) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1111,7 +1111,7 @@ open_audio_device(const char *devname, int iscapture,
 | 
			
		|||
     *  opens of the default system device.
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
    if ((iscapture) && (current_audio.impl.OnlyHasDefaultInputDevice)) {
 | 
			
		||||
    if ((iscapture) && (current_audio.impl.OnlyHasDefaultCaptureDevice)) {
 | 
			
		||||
        if ((devname) && (SDL_strcmp(devname, DEFAULT_INPUT_DEVNAME) != 0)) {
 | 
			
		||||
            SDL_SetError("No such device");
 | 
			
		||||
            return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -92,7 +92,7 @@ typedef struct SDL_AudioDriverImpl
 | 
			
		|||
    int SkipMixerLock;  /* !!! FIXME: do we need this anymore? */
 | 
			
		||||
    int HasCaptureSupport;
 | 
			
		||||
    int OnlyHasDefaultOutputDevice;
 | 
			
		||||
    int OnlyHasDefaultInputDevice;
 | 
			
		||||
    int OnlyHasDefaultCaptureDevice;
 | 
			
		||||
    int AllowsArbitraryDeviceNames;
 | 
			
		||||
} SDL_AudioDriverImpl;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -133,7 +133,7 @@ AndroidAUD_Init(SDL_AudioDriverImpl * impl)
 | 
			
		|||
    /* and the capabilities */
 | 
			
		||||
    impl->HasCaptureSupport = 0; /* TODO */
 | 
			
		||||
    impl->OnlyHasDefaultOutputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultInputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultCaptureDevice = 1;
 | 
			
		||||
 | 
			
		||||
    return 1;   /* this audio target is available. */
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -766,7 +766,7 @@ COREAUDIO_Init(SDL_AudioDriverImpl * impl)
 | 
			
		|||
    AudioObjectAddPropertyListener(kAudioObjectSystemObject, &devlist_address, device_list_changed, NULL);
 | 
			
		||||
#else
 | 
			
		||||
    impl->OnlyHasDefaultOutputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultInputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultCaptureDevice = 1;
 | 
			
		||||
 | 
			
		||||
    /* Set category to ambient sound so that other music continues playing.
 | 
			
		||||
       You can change this at runtime in your own code if you need different
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -52,7 +52,7 @@ DUMMYAUD_Init(SDL_AudioDriverImpl * impl)
 | 
			
		|||
    impl->CaptureFromDevice = DUMMYAUD_CaptureFromDevice;
 | 
			
		||||
 | 
			
		||||
    impl->OnlyHasDefaultOutputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultInputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultCaptureDevice = 1;
 | 
			
		||||
    impl->HasCaptureSupport = SDL_TRUE;
 | 
			
		||||
 | 
			
		||||
    return 1;   /* this audio target is available. */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -161,7 +161,7 @@ PSPAUD_Init(SDL_AudioDriverImpl * impl)
 | 
			
		|||
/*
 | 
			
		||||
    impl->HasCaptureSupport = 1;
 | 
			
		||||
 | 
			
		||||
    impl->OnlyHasDefaultInputDevice = 1;
 | 
			
		||||
    impl->OnlyHasDefaultCaptureDevice = 1;
 | 
			
		||||
*/
 | 
			
		||||
    /*
 | 
			
		||||
    impl->DetectDevices = DSOUND_DetectDevices;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -769,7 +769,7 @@ QSA_Init(SDL_AudioDriverImpl * impl)
 | 
			
		|||
    impl->SkipMixerLock = 0;
 | 
			
		||||
    impl->HasCaptureSupport = 1;
 | 
			
		||||
    impl->OnlyHasDefaultOutputDevice = 0;
 | 
			
		||||
    impl->OnlyHasDefaultInputDevice = 0;
 | 
			
		||||
    impl->OnlyHasDefaultCaptureDevice = 0;
 | 
			
		||||
 | 
			
		||||
    /* Check if io-audio manager is running or not */
 | 
			
		||||
    status = snd_cards();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue