Git Product home page Git Product logo

Comments (4)

jlsalmon avatar jlsalmon commented on April 29, 2024 1

Thanks @Krzmbrzl, that's really helpful. It looks like the CoreAudioOutput::propertyChange is the key piece here - it's not being invoked when switching devices, presumably because kAudioUnitProperty_StreamFormat is not changing on the AUHAL unit (which is the only property that Mumble is listening on). Suggesting that maybe we need to listen to additional kAudioUnitProperty_* changes, but I'm not familiar with CoreAudio so I don't really know how it's supposed to work at the moment.

Interestingly, when I switch off my bluetooth headphones while Mumble is using them, kAudioUnitProperty_StreamFormat is changing, the property change callback is invoked, and the audio switches correctly to my computer speakers. I'm not sure why the property is changing in that scenario only. I'll keep reading through the CoreAudio docs and see if I can figure it out.

from mumble.

jlsalmon avatar jlsalmon commented on April 29, 2024 1

Ok, it took a bit of googling (CoreAudio documentation is awful) but the patch in #5273 solves the issue, and it works great.

from mumble.

jlsalmon avatar jlsalmon commented on April 29, 2024

This is still an issue with macOS 11.6 / mumble 1.3.3, and it's rather a troublesome one for me at least.

I'd be happy to have a go at patching this myself, if someone could give me a very brief clue on the right part of the codebase to look at?

from mumble.

Krzmbrzl avatar Krzmbrzl commented on April 29, 2024

I'm not too familiar with the exact details but you should be able to work your way through by looking in src/mumble/AudioConfigDialog.cpp (this is the functional backend for the audio input/output settings pages) where qcbDevice should be the combo box in which you can set the device to use (the variable has the same name for the input and output dialog).
The actual audio stuff happens in src/mumble/AudioInput.cpp and src/mumble/AudioOutput.cpp and/or in the backend-specific code that can also be found under src/mumble. I think on macOS what you are looking for there is CoreAudio.mm.

Is that enough to get you started on this?

from mumble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.