Audio endianness and mutex usage fixes (malc.git).
From http://repo.or.cz/w/qemu/malc.git?a=shortlog;h=refs/heads/audio : Implicitly lock the mutex at startup of playback/capture threads, otherwise pthread_mutex_destroy (in audio_pt_fini) fails with EBUSY. Endianness fix. Remove a c&p residue. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4296 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									b0f6edb18e
								
							
						
					
					
						commit
						deb9d2eea7
					
				| 
						 | 
				
			
			@ -84,6 +84,10 @@ static void *qesd_thread_out (void *arg)
 | 
			
		|||
 | 
			
		||||
    threshold = conf.divisor ? hw->samples / conf.divisor : 0;
 | 
			
		||||
 | 
			
		||||
    if (audio_pt_lock (&esd->pt, AUDIO_FUNC)) {
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (;;) {
 | 
			
		||||
        int decr, to_mix, rpos;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -215,13 +219,10 @@ static int qesd_init_out (HWVoiceOut *hw, audsettings_t *as)
 | 
			
		|||
 | 
			
		||||
    default:
 | 
			
		||||
        dolog ("Internal logic error: Bad audio format %d\n", as->fmt);
 | 
			
		||||
#ifdef DEBUG_FMOD
 | 
			
		||||
        abort ();
 | 
			
		||||
#endif
 | 
			
		||||
        goto deffmt;
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
    obt_as.endianness = 0;
 | 
			
		||||
    obt_as.endianness = AUDIO_HOST_ENDIANNESS;
 | 
			
		||||
 | 
			
		||||
    audio_pcm_init_info (&hw->info, &obt_as);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -315,6 +316,10 @@ static void *qesd_thread_in (void *arg)
 | 
			
		|||
 | 
			
		||||
    threshold = conf.divisor ? hw->samples / conf.divisor : 0;
 | 
			
		||||
 | 
			
		||||
    if (audio_pt_lock (&esd->pt, AUDIO_FUNC)) {
 | 
			
		||||
        return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (;;) {
 | 
			
		||||
        int incr, to_grab, wpos;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -447,7 +452,7 @@ static int qesd_init_in (HWVoiceIn *hw, audsettings_t *as)
 | 
			
		|||
        obt_as.fmt = AUD_FMT_S16;
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
    obt_as.endianness = 0;
 | 
			
		||||
    obt_as.endianness = AUDIO_HOST_ENDIANNESS;
 | 
			
		||||
 | 
			
		||||
    audio_pcm_init_info (&hw->info, &obt_as);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue