mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	We have both sink and source in this module.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@613 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									e8b3819ac8
								
							
						
					
					
						commit
						4756d186ab
					
				
					 1 changed files with 23 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -221,10 +221,12 @@ static void sig_callback(pa_mainloop_api *api, pa_signal_event*e, int sig, void
 | 
			
		|||
    struct userdata *u = userdata;
 | 
			
		||||
    pa_cvolume old_vol;
 | 
			
		||||
    
 | 
			
		||||
    assert(u && u->sink && u->sink->get_hw_volume);
 | 
			
		||||
    assert(u);
 | 
			
		||||
 | 
			
		||||
    do_write(u);
 | 
			
		||||
 | 
			
		||||
    if (u->sink) {
 | 
			
		||||
        assert(u->sink->get_hw_volume);
 | 
			
		||||
        memcpy(&old_vol, &u->sink->hw_volume, sizeof(pa_cvolume));
 | 
			
		||||
        if (u->sink->get_hw_volume(u->sink) < 0)
 | 
			
		||||
            return;
 | 
			
		||||
| 
						 | 
				
			
			@ -233,6 +235,19 @@ static void sig_callback(pa_mainloop_api *api, pa_signal_event*e, int sig, void
 | 
			
		|||
                PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_CHANGE,
 | 
			
		||||
                u->sink->index);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if (u->source) {
 | 
			
		||||
        assert(u->source->get_hw_volume);
 | 
			
		||||
        memcpy(&old_vol, &u->source->hw_volume, sizeof(pa_cvolume));
 | 
			
		||||
        if (u->source->get_hw_volume(u->source) < 0)
 | 
			
		||||
            return;
 | 
			
		||||
        if (memcmp(&old_vol, &u->source->hw_volume, sizeof(pa_cvolume)) != 0) {
 | 
			
		||||
            pa_subscription_post(u->source->core,
 | 
			
		||||
                PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE,
 | 
			
		||||
                u->source->index);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static pa_usec_t sink_get_latency_cb(pa_sink *s) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue