mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	Add some debugging output from sample cache subsystem.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1430 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									df47c7b828
								
							
						
					
					
						commit
						6ba21d4a0b
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
					@ -138,6 +138,7 @@ static pa_scache_entry* scache_add_item(pa_core *c, const char *name) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_memchunk *chunk, uint32_t *idx) {
 | 
					int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_memchunk *chunk, uint32_t *idx) {
 | 
				
			||||||
    pa_scache_entry *e;
 | 
					    pa_scache_entry *e;
 | 
				
			||||||
 | 
					    char st[PA_SAMPLE_SPEC_SNPRINT_MAX];
 | 
				
			||||||
    assert(c && name);
 | 
					    assert(c && name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (chunk && chunk->length > PA_SCACHE_ENTRY_SIZE_MAX)
 | 
					    if (chunk && chunk->length > PA_SCACHE_ENTRY_SIZE_MAX)
 | 
				
			||||||
| 
						 | 
					@ -163,6 +164,10 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c
 | 
				
			||||||
    if (idx)
 | 
					    if (idx)
 | 
				
			||||||
        *idx = e->index;
 | 
					        *idx = e->index;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pa_log_debug("created sample \"%s\" (#%d), %d bytes with sample spec %s",
 | 
				
			||||||
 | 
					        name, e->index, e->memchunk.length,
 | 
				
			||||||
 | 
					        pa_sample_spec_snprint(st, sizeof(st), &e->sample_spec));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -229,7 +234,10 @@ int pa_scache_remove_item(pa_core *c, const char *name) {
 | 
				
			||||||
    if (pa_idxset_remove_by_data(c->scache, e, NULL) != e)
 | 
					    if (pa_idxset_remove_by_data(c->scache, e, NULL) != e)
 | 
				
			||||||
        assert(0);
 | 
					        assert(0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pa_log_debug("removed sample \"%s\"", name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    free_entry(e);
 | 
					    free_entry(e);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -276,6 +284,8 @@ int pa_scache_play_item(pa_core *c, const char *name, pa_sink *sink, pa_volume_t
 | 
				
			||||||
    if (!e->memchunk.memblock)
 | 
					    if (!e->memchunk.memblock)
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    pa_log_debug("playing sample \"%s\" on \"%s\"", name, sink->name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    t = pa_sprintf_malloc("sample:%s", name);
 | 
					    t = pa_sprintf_malloc("sample:%s", name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    pa_cvolume_set(&r, e->volume.channels, volume);
 | 
					    pa_cvolume_set(&r, e->volume.channels, volume);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue