output_init: added option to disable the hardware mixer
Added the per-device option "mixer_enabled" which allows users to disable the hardware mixer of an audio output.
This commit is contained in:
		
							
								
								
									
										11
									
								
								doc/user.xml
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								doc/user.xml
									
									
									
									
									
								
							@@ -285,6 +285,17 @@ cd mpd-0.14.2</programlisting>
 | 
				
			|||||||
                enabled.
 | 
					                enabled.
 | 
				
			||||||
              </entry>
 | 
					              </entry>
 | 
				
			||||||
            </row>
 | 
					            </row>
 | 
				
			||||||
 | 
					            <row>
 | 
				
			||||||
 | 
					              <entry>
 | 
				
			||||||
 | 
					                <varname>mixer_enabled</varname>
 | 
				
			||||||
 | 
					                <parameter>yes|no</parameter>
 | 
				
			||||||
 | 
					              </entry>
 | 
				
			||||||
 | 
					              <entry>
 | 
				
			||||||
 | 
					                Specifies whether the hardware mixer of this audio
 | 
				
			||||||
 | 
					                output should be used.  By default, all hardware
 | 
				
			||||||
 | 
					                mixers are enabled if available.
 | 
				
			||||||
 | 
					              </entry>
 | 
				
			||||||
 | 
					            </row>
 | 
				
			||||||
          </tbody>
 | 
					          </tbody>
 | 
				
			||||||
        </tgroup>
 | 
					        </tgroup>
 | 
				
			||||||
      </informaltable>
 | 
					      </informaltable>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -135,7 +135,8 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
 | 
				
			|||||||
	if (ao->data == NULL)
 | 
						if (ao->data == NULL)
 | 
				
			||||||
		return false;
 | 
							return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (plugin->mixer_plugin != NULL)
 | 
						if (plugin->mixer_plugin != NULL &&
 | 
				
			||||||
 | 
						    config_get_block_bool(param, "mixer_enabled", true))
 | 
				
			||||||
		ao->mixer = mixer_new(plugin->mixer_plugin, param);
 | 
							ao->mixer = mixer_new(plugin->mixer_plugin, param);
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		ao->mixer = NULL;
 | 
							ao->mixer = NULL;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user