This project is mirrored from https://github.com/libretro/libretro-lutro.git. Pull mirroring updated .
  1. 20 Apr, 2021 1 commit
    • Jake Stine's avatar
      fix stereo playback and looping logic in WAV decoder (#196) · 4218f337
      Jake Stine authored
      * fix looping logic bug in WAV streaming decoder.
      
      This was meant to make it into my earlier PR that added non-canonical WAV support. I fixed it over a week ago, but apparently it's hard to keep 5+ simultaneous PRs organized.
      
      * Fix wav stereo sample playback too.
      
      (I had only tested stereo ogg formats so far)
      4218f337
  2. 19 Apr, 2021 2 commits
    • Jake Stine's avatar
      audio: remove native pointer dependency on Source (#193) · 29ae5cbf
      Jake Stine authored
      * Added new build types: Debug, Tool, and Player.
      
       Debug is -O0 compiled with all assertions enabled.
       Tool is -O1 compiled with debug assertions disabled entirely.
       Player is -O3 compiled with tool assertions disabled, and all ignorable assertions demoted to log-only.
      
      Implementation of ignorable asserts is still partial, but as it stands this change is OK to go live (can add features later). On the todo list:
        - add popup to allow content creator to ignore the assert
        - add lua stacktrace information when lua context seems relevant
      
      * GHActions updated to be aware of new player and tool build configs
      
      * makefile: allow changing config from CLI without having to make clean
      
      Also force rebuild of vcxproj target since dep checking is currently insufficient. it should be checking dirs of all globbed source file includes for modifications, but it's not. and this is a really fast step, no point in not running it for now
      
      * Added lutro_errorf and lutro_alertf for logging errors and popup alerts, respectively.
      
       - Cleans up macros and keeps assertions clearly in the domain of Debug and Tooling builds.
       - removed play_assert and friends, which were both confusing terminology and not practical in design
      
      * audio: remove native pointer dependency on Source
      
      We can't store pointers to lua userdata in C. Lua may move the pointers at any time. So instead we must dereference the lua_ref to obtain the pointer at the point it is used, for example while mixing.
      
      Fixes a problem where the engine can crash after some amount of time, depending wildly on game behaviors and memory usage. In many cases no crash may ever occur. I have a test locally (still WIP) that verifies this problem/fix.
      29ae5cbf
    • Jake Stine's avatar
      audio: fix decoding of non-canonical wavefile headers. (#192) · 5217885f
      Jake Stine authored
      * Added new build types: Debug, Tool, and Player.
      
       Debug is -O0 compiled with all assertions enabled.
       Tool is -O1 compiled with debug assertions disabled entirely.
       Player is -O3 compiled with tool assertions disabled, and all ignorable assertions demoted to log-only.
      
      Implementation of ignorable asserts is still partial, but as it stands this change is OK to go live (can add features later). On the todo list:
        - add popup to allow content creator to ignore the assert
        - add lua stacktrace information when lua context seems relevant
      
      * GHActions updated to be aware of new player and tool build configs
      
      * makefile: allow changing config from CLI without having to make clean
      
      Also force rebuild of vcxproj target since dep checking is currently insufficient. it should be checking dirs of all globbed source file includes for modifications, but it's not. and this is a really fast step, no point in not running it for now
      
      * Added lutro_errorf and lutro_alertf for logging errors and popup alerts, respectively.
      
       - Cleans up macros and keeps assertions clearly in the domain of Debug and Tooling builds.
       - removed play_assert and friends, which were both confusing terminology and not practical in design
      
      * WAV: fix decoding of non-canonical wave headers.
      
      In short, we can't assume anything about these pesky subchunks.
      
      * printf formatting fixed
      5217885f
  3. 12 Apr, 2021 1 commit
    • Jake Stine's avatar
      Add new build types: Debug, Tool, and Player (#188) · a5ab4d4d
      Jake Stine authored
      * Added new build types: Debug, Tool, and Player.
      
       Debug is -O0 compiled with all assertions enabled.
       Tool is -O1 compiled with debug assertions disabled entirely.
       Player is -O3 compiled with tool assertions disabled, and all ignorable assertions demoted to log-only.
      
      Implementation of ignorable asserts is still partial, but as it stands this change is OK to go live (can add features later). On the todo list:
        - add popup to allow content creator to ignore the assert
        - add lua stacktrace information when lua context seems relevant
      
      * GHActions updated to be aware of new player and tool build configs
      
      * makefile: allow changing config from CLI without having to make clean
      
      Also force rebuild of vcxproj target since dep checking is currently insufficient. it should be checking dirs of all globbed source file includes for modifications, but it's not. and this is a really fast step, no point in not running it for now
      
      * Added lutro_errorf and lutro_alertf for logging errors and popup alerts, respectively.
      
       - Cleans up macros and keeps assertions clearly in the domain of Debug and Tooling builds.
       - removed play_assert and friends, which were both confusing terminology and not practical in design
      a5ab4d4d
  4. 28 Mar, 2021 2 commits
  5. 25 Mar, 2021 1 commit
  6. 23 Mar, 2021 1 commit
    • Jake Stine's avatar
      audio: add support for static sources, add lua_ref logic to playing sounds (#173) · b6a32d4d
      Jake Stine authored
      * audio: Overhauled. New Mixer, new decoders, and added proper support for soundData as a static source.
      
       - avoids cutting sounds before they finish playing
       - cleans up memory for sources
       - even closes file handles!!
      
      * Rename ogg vorbis decoder functions to decOgg_* to match with decWav_ API
      
      * audio: fix WAVE audio corruption at end of sample
      
      Main issue is that some RIFF WAV files have additional non-audio chunks at the end of the file, for meta data. We were mixing this into the audio buffer, causing noise.
      b6a32d4d
  7. 01 Mar, 2021 1 commit
  8. 19 Feb, 2021 1 commit
    • bobparadiso's avatar
      -removed redundant fseeks for WAV, there's an fseek right before the fread,... · 2a8f3be5
      bobparadiso authored
      -removed redundant fseeks for WAV, there's an fseek right before the fread, only pos needs to be set (#161)
      
      -added proper seek and tell for OGG
      -fixed WAV seek and tell to Lua to be in num samples instead of byte count
      -fix for when play is called on a source again before it finished playing, to match Love2D, pos should not be reset. Probably also helps if we implement Pause, since also then Play should leave pos where it is.
      -pos now consistently reset on stop
      2a8f3be5
  9. 03 Feb, 2021 1 commit