Commit graph

16 commits

Author SHA1 Message Date
Gered eb6a363afd formatting
note that i'm intentionally not using rustfmt. i've tried to like that
tool, but in the end i just really don't like it. too many edge cases
and subjectivity and not enough customization. which is probably the
intent. which makes me hate it that much more. fuck you, rustfmt.
2023-03-02 15:10:27 -05:00
Gered f2f7ae5dee update examples with new input device and main loop event handling stuff 2023-02-27 14:51:55 -05:00
Gered b010c044ef remove explicit sdl2 dependency from example apps
they all still depend on sdl2 through the libretrogd dependency, but
the benefit is that future sdl2 version updates are much easier to
accomplish for most apps, since only libretrogd needs to be updated
(in theory).
2023-01-18 17:04:25 -05:00
Gered 592be161c3 update example apps to not use sdl2 event types 2023-01-18 17:03:21 -05:00
Gered 7c568fd09d update to a more recent version of sdl2. only tested on linux for now
0.35.2 is the latest version available via cargo right now, and that
version has some issues building for me that have been resolved in
subsequent commit(s). for some reason the maintainers have not pushed
a new version of sdl2 to cargo for quite some time despite numerous
fixes and updates being available ...? bah!

also the current sdl2 `features` set will probably only work for linux
builds. i will try to work out windows + mac build issues shortly
2023-01-18 13:30:25 -05:00
Gered 66bf1e40cc pin anyhow and thiserror versions
due to encountering some compile errors on a fresh system which pulled
down the newest minor versions of both. these two libraries do not seem
to follow "good" semantic versioning ... ? ugh. will try to work out
the compiler issues with the latest versions of these later ...
2023-01-18 13:26:53 -05:00
Gered 44984c716c add "apply" method variant that handles device locking itself
rename the old "apply" to "apply_to_device". meh. naming is hard.
i expect that most of the time i'd want to use the "apply" method i'm
adding here that handles device locking internally, so that is why i've
chosen to let it be called "apply" and to rename the other one.
2022-07-10 14:21:52 -04:00
Gered e276eb950d add AudioQueue
for queuing audio "commands" which is a much nicer way to interact
with the audio system in general in a more complex application, as this
lets you play audio in more of a "fire and forget" kind of way.

Rc<AudioBuffer> play methods provided as an alternative because
otherwise you end up with a somewhat gross double-copy of the audio
buffer being played. but i didn't want to necessarily force use of
Rc<AudioBuffer> just yet ... thus both versions of these methods are
provided.
2022-07-01 16:23:28 -04:00
Gered 20d0d8630d add global audio volume control 2022-06-05 18:42:09 -04:00
Gered 13b18e3d71 convenience methods for playing/stopping specific audio channels 2022-06-05 18:29:57 -04:00
Gered 17e30fdec4 simplify 2022-05-29 17:47:24 -04:00
Gered 28c964e37e add initial support for playing custom audio waveform generators
with typical sine wave generator example added to the audio_playback
example project
2022-05-29 17:43:51 -04:00
Gered 94922caf71 minor updates to audio_playback example
using Audio's AudioSpec property to get the target format to convert to
2022-05-29 13:53:35 -04:00
Gered 23f2d4da02 update audio_playback example with varied wav file formats to convert 2022-05-29 13:18:51 -04:00
Gered e4a90e7f10 play_buffer now enforces matching AudioSpecs 2022-05-29 10:57:04 -04:00
Gered 3bf69d651d add audio_playback example 2022-05-28 20:29:40 -04:00