No description
Find a file
Stephen Gutekanst 9d95fcf0c2 Audio: always target 48000hz f32 audio
Resampling, which requires fairly involved (and certainly not free) filters,
is needed if the audio we are mixing does not match the sample rate of the
output device. Most OS audio APIs support resampling on their own, but have
preferred hardware formats. Most console hardware since Xbox/PS2/GC supposedly
prefers 48khz natively, but otherwise there seems to be no big preference
between 48khz or 44.1khz.

The important aspect is that we pick one, and encourage people to keep their
audio in one, so that runtime resampling is not required (both in mach itself,
and potentially without-our-knowledge in the OS audio system if we chose a
sample rate which the native hardware does not prefer.)

General guidance will be:

* `mach.Audio` module will always aim to select 48khz, f32 audio output from the
  OS APIs. Let the OS APIs do resampling, or if they do not then we can do so.
* We will prefer 48khz, f32 audio samples everywhere internally in our basic audio
  mixing etc. APIs.
* Tooling will aim to convert audio to Opus (or flac for lossless) format, with 48khz
  and number of channels depending on audio type (e.g. 1ch for most sfx, any number of
  channels for bgm, and maybe some exception for multi-channel sfx in the future.)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-05-05 12:56:21 -07:00
.github all: update Zig to version 0.12.0-dev.3180+83e578a18 2024-03-08 22:04:29 -07:00
examples add play-opus example 2024-05-05 21:10:07 +03:30
src Audio: always target 48000hz f32 audio 2024-05-05 12:56:21 -07:00
.gitattributes use mach-model3d via package manager 2023-07-01 22:33:35 -07:00
.gitignore mach-core moves back into the main repository 2024-03-05 00:22:22 -07:00
.zigversion update .zigversion 2024-03-08 23:59:31 -07:00
build.zig add play-opus example 2024-05-05 21:10:07 +03:30
build.zig.zon add play-opus example 2024-05-05 21:10:07 +03:30
LICENSE LICENSE: note directories with a separate LICENSE file 2021-07-05 12:46:20 -07:00
LICENSE-APACHE initialize repository 2021-07-04 10:36:34 -07:00
LICENSE-MIT initialize repository 2021-07-04 10:36:34 -07:00
README.md README: cleanup & link to new website 2023-08-13 17:14:09 -07:00

mach-opus

Zig game engine & graphics toolkit for building high-performance, truly cross-platform, robust & modular games, visualizations, and desktop/mobile GUI apps.

gen-texture-light boids textured-cube

Learn more

machengine.org

Join the community

Join the Mach community on Discord to discuss this project, ask questions, get help, etc.