Re: Earwax

@157
You couldn't code something with the well documented parts of the system could you? Had to be bloody awkward! smile

So there is an issue for me (anyone really) to create some sound tutorials.

The basic idea is:

from earwax import BufferCache, SoundManager, Sound, Point

# Create a buffer cache:

buffer_cache: BufferCache = BufferCache(1024 ** 3)
# Create a manager.
m: SoundManager = SoundManager(ctx, buffer_cache=buffer_cache)

path: Path = Path('sound.wav')

# Play an unpanned sound:
unpanned_sound: Sound = m.play_path(path)

# Play a stereo sound (panned hard right):

Stereo_sound: Sound = m.play_path(path, position=1.0)

# Play a spacial sound (at coordinates (3.0, 4.0, 5.0)):
spacial_sound: Sound = m.play_path(path, position=Point(3.0, 4.0, 5.0))

You can specify any argument of Sound.__init__ when using the SoundManager.play_* methods. Also, a sound manager allows you to se defaults for all of them.

There are already a couple of sound managers available on earwax.Game instances: interface_sound_manager, ambiance_sound_manager, and music_sound_manager. The latter 2 will automatically loop their sounds (unless you specify looping=False).

Hopefully that's enough to be getting on with.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : amerikranian via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : chrisnorman7 via Audiogames-reflector

Reply via email to