Commit graph

256 commits

Author SHA1 Message Date
Ray
83b3478fe4 Reviewed some TODO 2021-10-13 23:45:57 +02:00
raysan5
ddc1fdf6d5 REVIEWED: SeekMusicStream() formating 2021-09-23 18:11:24 +02:00
Uneven Prankster
7fa521fae4
Fix + Return if attempting to seek on a module format (#2008) 2021-09-23 17:38:37 +02:00
Uneven Prankster
19ef765382
SeekMusicStream initial implementation (#2006) 2021-09-22 21:55:13 +02:00
Ray
8b3d054408 Minor reviews 2021-09-21 23:49:42 +02:00
Ray
a0f8682905 REVIEWED: <name>Count for consistency
Following english rules, it should be singular name before Count.
2021-09-01 23:09:30 +02:00
raysan5
d98e61c6eb Minor format tweaks 2021-08-28 12:01:16 +02:00
Ray
936199d8de Review dates 2021-08-27 18:50:02 +02:00
Ray
18af18479f REVIEWED: ExportWaveAsCode() 2021-08-27 18:49:03 +02:00
Ray
a5beb940f8 Remove trailing spaces 2021-08-16 23:23:16 +02:00
Ray
1b4c58b66f WARNING: BREAKING: Use frameCount on audio
This is a big change for optimization and a more professional understanding of audio. Instead of dealing with samples, now we deal with frames, like miniaudio does, so, avoiding continuous conversions from samples to frames.
2021-08-16 11:06:31 +02:00
raysan5
1613057881 Update raudio.c 2021-07-30 13:45:01 +02:00
raysan5
8b7f43f89b WARNING: BREAKING CHANGE: rlgl complete decoupling from raylib -WIP-
rlgl has been redesigned to avoid any dependency to `raylib` or `raymath`, all functions using some of those libs have been reviewed.
 - REMOVED: `Texture2D`, `Shader` structs dependency
 - REMOVED: `Vector3`, `Matrix` structs dependency
 - REMOVED: raymath functions dependency, all required math is implemented in rlgl
 - ADDED: `rlMatrix` custom rlgl type
 - ADDED: `utils.c`: `rlMatrixFromMatrix()` and `rlMatrixToMatrix()` for a safe conversion between raylib<->rlgl matrix types
 - ADDED: `rl` prefix to all `rlgl` structs
 - Other small tweaks here and there
2021-07-29 21:57:50 +02:00
raysan5
0c17d1e14f Minor formatting tweak 2021-07-28 12:58:43 +02:00
raysan5
5ed814e950 Minor tweaks and comments 2021-07-09 17:36:20 +02:00
raysan5
f81dfce19f Minor tweaks 2021-07-01 21:43:13 +02:00
raysan5
9e7ca41f58 Remove trailing spaces 2021-06-30 16:39:07 +02:00
Ray
aa86e9d399 REVIEWED: Minor tweaks on log messages 2021-06-26 13:18:39 +02:00
Ray
7cbfca8bd1 REVIEWED: Simplified code to avoid extra functions calls 2021-06-26 13:06:22 +02:00
Ray
4b93feb172 Remove trail spaces 2021-06-13 17:08:30 +02:00
Ray
213c990eda Reviewed issue 2021-06-13 12:08:32 +02:00
Ray
b188008a1c Review code formatting 2021-06-10 18:00:44 +02:00
raysan5
e95d8bc655 Minor format tweaks 2021-06-05 12:33:05 +02:00
raysan5
6445200a93 Removed GetAudioStreamBufferSizeDefault() 2021-06-05 12:32:52 +02:00
Ray
e00d2439b9 WARNING: BREAKING: Consistency renamings
RENAMED: InitAudioStream() -> LoadAudioStream()
RENAMED: CloseAudioStream() -> UnloadAudioStream()
2021-06-03 23:36:47 +02:00
Ray
121c689b78 Review code formatting 2021-06-03 20:25:28 +02:00
Ray
5e3cf28642 Update raudio.c 2021-05-31 19:32:48 +02:00
Ray
71995d52b3 REVIEWED: exit() on LOG_FATAL instead of LOG_ERROR #1796 2021-05-30 18:02:06 +02:00
Ray
0369ec9adf Some code tweaks 2021-05-30 11:50:32 +02:00
Ray
23a08a483e WARNING: RENAMED: IsMusicPlaying() -> IsMusicStreamPlaying() 2021-05-20 19:27:04 +02:00
Ray
b62c86572e REVIEWED: raudio_standalone #1752 2021-05-07 15:38:13 +02:00
Ray
581bd0eb02 Remove trailing spaces 2021-04-18 23:50:32 +02:00
Jeffery Myers
f6f9a3d925
use xm streams in the same sample sample size as the output device (#1716) 2021-04-09 11:00:21 +02:00
Ray
551944e15b Minor comment tweaks 2021-04-06 13:04:15 +02:00
raysan5
aed0fee2ca Remove trailing spaces 2021-04-01 20:24:33 +02:00
raysan5
8f1d81df0f Review code formatting 2021-03-31 17:55:46 +02:00
Ray
24dae29a03 Review latest PR and some formatting 2021-03-22 20:41:33 +01:00
Jeffery Myers
2c0a533948
[AUDIO] Music Looping enhancements (#1665)
* Add loop functions for music files.
Tell xm tracker to loop tracker when loop state changes.
Don't let looped xm tracker streams restart, they are infinite
Use modulo to make time tracker for xm looped streams work correctly.

* Remove loop functions, set XM loop in update based on flag.
Formatting cleanups.

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
2021-03-22 20:36:13 +01:00
Jeffery Myers
b573ff3e7a
[AUDIO] Use device native sample rates (#1660)
* Init MinAudio to a sample rate of 0 to let the device pick the rate.
Read the rate from the device after it starts up.
Convert AUDIO_DEVICE_SAMPLE_RATE from a #def into an int, that is set from the device's rate
Set all sample systems to use the AUDIO_DEVICE_SAMPLE_RATE as the target rate to minimize resampling.

* use device sample rate instead of separate var
let config define a device sample rate if it wants to, but let the default be 0 for native rate.

* Don't use fixed sample rates for tracker files.
Remove config default audio buffer size and replace with a function that computes one for a reasonable frame rate at the output sample rate.
2021-03-21 22:07:55 +01:00
Ray
9909068714 Removed trailing spaces 2021-03-19 19:43:44 +01:00
Ray
a1d9987e7c WARNING: BREAKING: REVIEWED some enums naming
Now enum names are more consistent between them.
2021-03-19 13:19:54 +01:00
Ray
1ed72b7812 Minor struct organization tweak 2021-03-04 12:08:54 +01:00
Ray
bcc4418ff0 REVIEWED: GetFileExtension() to include the dot #1523 2021-03-02 01:07:08 +01:00
Agnis "NeZvērs" Aldiņš
ead339fa96
LoadMusicStreamFromMemory OGG support (#1613) 2021-02-25 11:55:08 +01:00
Agnis "NeZvērs" Aldiņš
24839c7cfb
jar_xm_create_context_safe requesting const char* (#1611)
Fixing compiler warning for passing (unsigned char*) to (const char*)
2021-02-24 12:23:39 +01:00
Agnis "NeZvērs" Aldiņš
0cb748f30b
LoadMusicStreamFromMemory wav mp3 flac support (#1609) 2021-02-24 09:22:21 +01:00
Agnis "NeZvērs" Aldiņš
209445ccde
LoadMusicStreamFromMemory (#1606)
* define SUPPORT_FILEFORMAT_MOD in config.h

* RLAPI LoadModuleFromData() definition in raylib.h

* LoadModuleFromData() definition in raudio.h

* LoadModuleFromData implementation in raudio.c

* Rename API to LoadMusicStreamFromMemory & default unload.

* raudio.c tabs to spaces

* Styling curly bracket and removing dev debugging TRACELOG

Co-authored-by: nezvers <agnis16@inbox.lv>
2021-02-22 19:45:52 +01:00
Chris
ccb083af52
[raudio] Fix load and unload issues with Music (#1588)
* Add MUSIC_AUDIO_NONE to MusicContextType and format fixes
- Useful to check the context type to see if the format is recognized. Defaulting to wav causes issues where formats are assumed to
be wav.

* Fix memory issues with LoadMusicStream and UnloadMusicStream
- Set ctxType and ctxData even if the format fails to load.
- Set ctxData to NULL if it fails and check for null inside UnloadMusicStream.
- Change RL_MALLOC when loading formats to RL_CALLOC to prevent undefined behavior.
- Add NULL check when unloading xm file.
2021-02-14 17:37:34 +01:00
raysan5
c49ce58f02 REVIEWED: Multichannel sound system #1548
I don't like this solution but I think it's valid in the meantime....
2021-02-07 19:20:30 +01:00
raysan5
edb54c6cb1 REVIEWED: CloseAudioBufferPool(), uninit buffers properly #1548 2021-02-05 19:45:13 +01:00