Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
This commit is contained in:
		
						commit
						ccd804c6c0
					
				|  | @ -48,7 +48,7 @@ | ||||||
| 
 | 
 | ||||||
| #define AUDIO_DEVICE    "/dev/audio" | #define AUDIO_DEVICE    "/dev/audio" | ||||||
| 
 | 
 | ||||||
| _X_EXPORT int | _X_EXPORT void | ||||||
| xf86OSRingBell(int loudness, int pitch, int duration) | xf86OSRingBell(int loudness, int pitch, int duration) | ||||||
| { | { | ||||||
|     static short    samples[BELL_SAMPLES]; |     static short    samples[BELL_SAMPLES]; | ||||||
|  | @ -66,7 +66,7 @@ xf86OSRingBell(int loudness, int pitch, int duration) | ||||||
|     int             audioFD; |     int             audioFD; | ||||||
| 
 | 
 | ||||||
|     if ((loudness <= 0) || (pitch <= 0) || (duration <= 0)) { |     if ((loudness <= 0) || (pitch <= 0) || (duration <= 0)) { | ||||||
|         return 0; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     lastFreq = 0; |     lastFreq = 0; | ||||||
|  | @ -76,7 +76,7 @@ xf86OSRingBell(int loudness, int pitch, int duration) | ||||||
|     if (audioFD == -1) { |     if (audioFD == -1) { | ||||||
|         xf86Msg(X_ERROR, "Bell: cannot open audio device \"%s\": %s\n", |         xf86Msg(X_ERROR, "Bell: cannot open audio device \"%s\": %s\n", | ||||||
|                 AUDIO_DEVICE, strerror(errno)); |                 AUDIO_DEVICE, strerror(errno)); | ||||||
|         return -1; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     freq = pitch; |     freq = pitch; | ||||||
|  | @ -126,7 +126,7 @@ xf86OSRingBell(int loudness, int pitch, int duration) | ||||||
|                 "Bell: AUDIO_SETINFO failed on audio device \"%s\": %s\n", |                 "Bell: AUDIO_SETINFO failed on audio device \"%s\": %s\n", | ||||||
|                 AUDIO_DEVICE, strerror(errno)); |                 AUDIO_DEVICE, strerror(errno)); | ||||||
|         close(audioFD); |         close(audioFD); | ||||||
|         return -1; |         return; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     iovcnt = 0; |     iovcnt = 0; | ||||||
|  | @ -155,7 +155,7 @@ xf86OSRingBell(int loudness, int pitch, int duration) | ||||||
|                                "Bell: writev failed on audio device \"%s\": %s\n", |                                "Bell: writev failed on audio device \"%s\": %s\n", | ||||||
|                                 AUDIO_DEVICE, strerror(errno)); |                                 AUDIO_DEVICE, strerror(errno)); | ||||||
|                         close(audioFD); |                         close(audioFD); | ||||||
|                         return -1; |                         return; | ||||||
|                     } |                     } | ||||||
|                     i = iovcnt; |                     i = iovcnt; | ||||||
|                 } else { |                 } else { | ||||||
|  | @ -181,5 +181,5 @@ xf86OSRingBell(int loudness, int pitch, int duration) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     close(audioFD); |     close(audioFD); | ||||||
|     return 0; |     return; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue