PortAudio / portaudio

PortAudio is a cross-platform, open-source C language library for real-time audio input and output.
Other
1.46k stars 303 forks source link

Spatial Audio #869

Closed ngoiyaeric closed 8 months ago

ngoiyaeric commented 9 months ago

I'd like to add spatial audio features onto the codebase. Any advise on how to achieve this. Currently checking out wwise sdk, https://github.com/ngoiyaeric/WwiseIncludes

RossBencina commented 9 months ago

Can you clarify what you mean by "spatial audio features"? To me this could mean:

  1. Exposing platform specific spatial audio capabilities (which? what are they?)
  2. Implement your own spatialisation algorithms: this can be done on top of PortAudio and requires no obvious changes to PortAudio.
ngoiyaeric commented 9 months ago

Capabilities such as 7.1 surround sound configuration interleaving audio signal for multiple inputs. I've recently started looking for ways to do this on top of port audio, any ideas how this can be achieved and from what module

star69rem commented 9 months ago

Capabilities such as 7.1 surround sound configuration interleaving audio signal for multiple inputs. I've recently started looking for ways to do this on top of port audio, any ideas how this can be achieved and from what module

PortAudio already supports this. It's trivial to implement. All you have to do is use maxOutputChannels from the device info to choose what to do for different speaker configurations.

You just build out your output following these channel configuration conventions: https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ksmedia/ns-ksmedia-ksaudio_channel_config

RossBencina commented 9 months ago

In addition to supporting multi-channel audio, a number of PortAudio host APIs have extensions to support channel selection. e.g. include\pa_win_wmme.h, include\pa_win_ds.h, and include\pa_win_wasapi.h provide the channelMask field. See the host-api-specific header files for details.

RossBencina commented 9 months ago

@ngoiyaeric does this resolve your query? if so I'd like to close the ticket.

ngoiyaeric commented 9 months ago

Yes thank you

On Sat, Jan 6, 2024 at 1:35 AM Ross Bencina @.***> wrote:

@ngoiyaeric https://github.com/ngoiyaeric does this resolve your query? if so I'd like to close the ticket.

— Reply to this email directly, view it on GitHub https://github.com/PortAudio/portaudio/issues/869#issuecomment-1879338825, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3QF7VRO43CJ7DH2JJCSYALYNB52XAVCNFSM6AAAAABA27QNSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZZGMZTQOBSGU . You are receiving this because you were mentioned.Message ID: @.***>

-- Artist Engineer +1-548-437-9951 www.ericngoiya.com http://www.ericngoiya.com/