mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Merge branch 'master' of ssh://git.freedesktop.org/git/pulseaudio/pulseaudio
This commit is contained in:
		
						commit
						6f2e22e7ad
					
				
					 4 changed files with 13 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -75,6 +75,7 @@ struct userdata {
 | 
			
		|||
 | 
			
		||||
    char *filename;
 | 
			
		||||
    int fd;
 | 
			
		||||
    size_t buffer_size;
 | 
			
		||||
 | 
			
		||||
    pa_memchunk memchunk;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -123,7 +124,7 @@ static int process_render(struct userdata *u) {
 | 
			
		|||
    pa_assert(u);
 | 
			
		||||
 | 
			
		||||
    if (u->memchunk.length <= 0)
 | 
			
		||||
        pa_sink_render(u->sink, pa_frame_align(pa_pipe_buf(u->fd), &u->sink->sample_spec), &u->memchunk);
 | 
			
		||||
        pa_sink_render(u->sink, u->buffer_size, &u->memchunk);
 | 
			
		||||
 | 
			
		||||
    pa_assert(u->memchunk.length > 0);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -306,8 +307,10 @@ int pa__init(pa_module *m) {
 | 
			
		|||
 | 
			
		||||
    pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
 | 
			
		||||
    pa_sink_set_rtpoll(u->sink, u->rtpoll);
 | 
			
		||||
    pa_sink_set_max_request(u->sink, pa_frame_align(pa_pipe_buf(u->fd), &u->sink->sample_spec));
 | 
			
		||||
    pa_sink_set_fixed_latency(u->sink, pa_bytes_to_usec(pa_pipe_buf(u->fd), &u->sink->sample_spec));
 | 
			
		||||
 | 
			
		||||
    u->buffer_size = pa_frame_align(pa_pipe_buf(u->fd), &u->sink->sample_spec);
 | 
			
		||||
    pa_sink_set_max_request(u->sink, u->buffer_size);
 | 
			
		||||
    pa_sink_set_fixed_latency(u->sink, pa_bytes_to_usec(u->buffer_size, &u->sink->sample_spec));
 | 
			
		||||
 | 
			
		||||
    u->rtpoll_item = pa_rtpoll_item_new(u->rtpoll, PA_RTPOLL_NEVER, 1);
 | 
			
		||||
    pollfd = pa_rtpoll_item_get_pollfd(u->rtpoll_item, NULL);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -164,7 +164,7 @@ PA_C_DECL_BEGIN
 | 
			
		|||
 * access this data safely, we must extend our example a bit:
 | 
			
		||||
 *
 | 
			
		||||
 * \code
 | 
			
		||||
 * static volatile int *drain_result = NULL;
 | 
			
		||||
 * static int * volatile drain_result = NULL;
 | 
			
		||||
 *
 | 
			
		||||
 * static void my_drain_callback(pa_stream*s, int success, void *userdata) {
 | 
			
		||||
 *     pa_threaded_mainloop *m;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -497,7 +497,7 @@ bool pa_memblock_is_read_only(pa_memblock *b) {
 | 
			
		|||
    pa_assert(b);
 | 
			
		||||
    pa_assert(PA_REFCNT_VALUE(b) > 0);
 | 
			
		||||
 | 
			
		||||
    return b->read_only && PA_REFCNT_VALUE(b) == 1;
 | 
			
		||||
    return b->read_only || PA_REFCNT_VALUE(b) > 1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* No lock necessary */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4721,6 +4721,11 @@ static void command_set_card_profile(pa_pdispatch *pd, uint32_t command, uint32_
 | 
			
		|||
 | 
			
		||||
    CHECK_VALIDITY(c->pstream, profile, tag, PA_ERR_NOENTITY);
 | 
			
		||||
 | 
			
		||||
    pa_log_info("Application \"%s\" requests card profile change. card = %s, profile = %s",
 | 
			
		||||
                pa_strnull(pa_proplist_gets(c->client->proplist, PA_PROP_APPLICATION_NAME)),
 | 
			
		||||
                card->name,
 | 
			
		||||
                profile->name);
 | 
			
		||||
 | 
			
		||||
    if ((ret = pa_card_set_profile(card, profile, true)) < 0) {
 | 
			
		||||
        pa_pstream_send_error(c->pstream, tag, -ret);
 | 
			
		||||
        return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue