How to disable volume control? (Set permanent absolute volume) #727
-
I am using this (wonderful) library to add bluetooth audio to my car's (Jeep WJ) factory radio. Because the volume control is done from the radio, I don't want any volume control from the audio source. I see the A2DPNoVolumeControl class, an the set_enabled function in A2DPVolumeControl.h, but I do not know how to use them; my C coding skills are not that great. Are there any examples that use this functionality? Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Ah, the next page I clicked after posting this had most of the answer: VolumeControl This works, but still allows the volume to be set on the source device; it just has no effect unless set to zero. Is there any way to disable volume controls on the source device (iPhone) like real bluetooth head units do? |
Beta Was this translation helpful? Give feedback.
I am not sure if I understand you correctly: using the A2DPNoVolumeControl is just making sure that the audio is sent to the output as-is (w/o reducing the volume).
If you want to pin it to a fixed value, just implement your own A2DPVolumeControl subclass that sets the volumeFactor to your desired value.
ps. I have added a constructor to the A2DPNoVolumeControl that accepts the fixed reduced volume...