Commit graph

66 commits

Author SHA1 Message Date
Ray
05992a6fce Tweaks 2020-02-27 16:37:32 +01:00
Ray
ac73e3b5e2 REDESIGN: ExportWave()
Use new file I/O ABI
2020-02-27 16:15:20 +01:00
Ray
5ff0776235 Remove trail spaces and some tweaks 2020-02-27 13:33:09 +01:00
Ray
0f783aab34 Remove TraceLog() dependency on standalone mode 2020-02-26 20:23:36 +01:00
Ray
51db3b589d Review function name on RAUDIO_STANDALONE 2020-02-18 18:14:22 +01:00
Ray
3f25c52a29 Some security checks in case music is not properly loaded 2020-02-18 16:30:52 +01:00
Ray
91b2dc2aa9 [raudio] ADDED: SetAudioStreamBufferSizeDefault()
There could be some cases where we need to define the internal audio buffer size, now it's possible.

RENAMED: InitAudioBuffer() to LoadAudioBuffer()
RENAMED: CloseAudioBuffer() to UnloadAudioBuffer()

Renamed some defines and reviewed some comments.
2020-02-14 17:13:37 +01:00
Ray
7459a5c6ef Remove "No Audio Buffer" traces 2020-02-14 11:44:50 +01:00
Ray
3b3e163c48 [raudio] Corrected issue with OGG sound loading 2020-02-13 11:41:28 +01:00
Ray
1b20182d33 Updated periodSize reference 2020-02-12 14:45:02 +01:00
Ray
7dfe42d6d0 Trace log comment review 2020-02-12 13:49:08 +01:00
Ray
484c6b360f Reviewed Cppcheck issues #1098 2020-02-12 13:16:18 +01:00
raysan5
28e12a6c6a [raudio] Update to latest miniaudio 0.10 2020-02-10 12:42:40 +01:00
raysan5
131132f17d Minor tweaks 2020-02-10 10:56:48 +01:00
raysan5
9922160ab4 Minor tweaks 2020-02-09 13:23:12 +01:00
Ray
b5fe41f41a Review libc dependencies and remove when possible
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions:

 - stdlib.h: primary dependency is for malloc() and free()
 - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI?
 - string.h: just around 8 functions required
 - math.h: just around 8 functions required
 - others: 1-2 functions required for some other headers
2020-02-04 16:55:24 +01:00
David Reid
7024628c65
Update to miniaudio 0.10 (#1092)
* Update to miniaudio 0.10

This replaces the old ma_pcm_converter with ma_data_converter.

At this time of this commit, miniaudio 0.10 is still in the testing
phase. To make it easier to update miniaudio.h during this period, I've
temporarily moved the @raysan5 Win32 customizations to raudio.c because
there may be quite a few updates to miniaudio.h during this time.

* Use miniaudio's built-in volume control.
2020-02-04 13:43:31 +01:00
Ray
c3f06b7470 Remove all trail spaces 2020-02-03 19:26:28 +01:00
Ray
cde26c743c Replace TraceLog() function by TRACELOG macro
Added SUPPORT_TRACELOG_DEBUG config
2020-02-03 19:13:24 +01:00
Ray
40b73a8a91
Develop branch integration (#1091)
* [core] REDESIGNED: Implement global context

* [rlgl] REDESIGNED: Implement global context

* Reviewed globals for Android

* Review Android globals usage

* Update Android globals

* Bump raylib version to 3.0 !!!

* [raudio] REDESIGNED: Implement global context

* [raudio] Reorder functions

* [core] Tweaks on descriptions

* Issues with SUPPORT_MOUSE_GESTURES

* [camera] Use global context

* REDESIGN: Move shapes drawing texture/rec to RLGL context

* Review some issues on standalone mode

* Update to use global context

* [GAME] Upload RE-PAIR game from GGJ2020 -WIP-

* Update game: RE-PAIR

* [utils] TRACELOG macros proposal

* Update config.h
2020-02-03 18:31:30 +01:00
Ray
c715cae18d Some tweaks 2020-01-28 16:40:12 +01:00
Ray
05443cd0c8 Corrected bug #989 2020-01-26 18:29:13 +01:00
jbosh
019434a37e Fix for short non-looping sounds (#1067)
Short non-looping sounds can sometimes think they need to keep playing and will output their first few frames again. This helps to break out of all the loops instead of just this one.
2020-01-14 09:15:52 +01:00
Ray
4211056354 Reviewed some comments 2020-01-08 18:21:08 +01:00
Ray
f46fcb8307 IsAudioBufferPlaying() replace ERROR by WARNING 2020-01-08 12:41:36 +01:00
raysan5
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
illegalinstruction
caa1f45643 Forcibly ensure .xm playback starts in the right place; fixes #1043. (#1045) 2019-12-21 13:02:54 +01:00
João Coelho
75b0264f35 fix various problems, thanks CppCheck :) (#1005)
* explained a bit more the core_window_letterbox example

* fixed a few 'ups' moments that could lead to mild head pain and time loss
2019-10-29 15:57:19 +01:00
Ray
1878a9ea01 Corrected possible memory leak #993 2019-10-22 23:15:41 +02:00
Ray
b75511248d Remove trailing spaces 2019-10-17 17:18:03 +02:00
Michael Vetter
047f093503 Remove dead assignments (#980)
The result of `success` is actually never used. Either we should check
for it and return or remove it. I assume just checking the last one is
okay.
2019-10-03 17:06:08 +02:00
Ray
df84f93938 Add security checks on file writting 2019-09-30 17:32:06 +02:00
Ray
861a619053 Review dr_flac usage
Replaced DEPRECATED functions
2019-09-03 23:24:09 +02:00
Ray
fc95ceadf0 Remove sampleLeft from Music struct... -WIP-
...moved to internal AudioBuffer structure as totalFramesProcessed, now time measure works again... but there is some problem with looping...
Also note some inconsistencies between frames and samples, it seems those concepts are not considered correctly in the code.
2019-09-03 23:08:02 +02:00
raysan5
c661cad692 Review all RL_CALLOC() calls
All data should be properly initialized by now
2019-08-27 10:56:49 +02:00
raysan5
c387bc586d RENAMED: IsAudioBufferProcessed() -> IsAudioStreamProcessed()
Renamed for consistency with similar functions
2019-08-13 17:41:31 +02:00
Ray
e6e48675cc Formating tweaks 2019-08-08 23:08:54 +02:00
chriscamacho
2d5cc5ddbf fixed xmloader bug, user must free model shaders and textures as they might be shared (#933) 2019-08-08 09:57:21 +02:00
Ray
251f90cd31 WARNING: Replaced Music pointer by struct
Now, multiple music parameters are exposed to the user!
2019-07-26 10:26:39 +02:00
Ray
ae95111006 Some variables renamed 2019-07-24 22:37:24 +02:00
Ray
543c0ba30d Added Sound parameters data 2019-07-24 14:48:45 +02:00
Ray
2cb3b91913 Try to avoid collision with CoreAudio on macOS 2019-07-23 23:08:29 +02:00
Ray
b44b7dd310 WARNING: Complete review of raudio -WIP-
This module has been completely reviewed, old structures still contained OpenAL useless data, a full module revision. Some of the changes:
 - Redesigned internal MusicData structure
 - Exposed MusicStream structure data
 - Reviewed AudioStream structure
 - Redesigned Sound structure

Still some work to do...
2019-07-23 22:21:01 +02:00
Ray
892813de76 Review multichannel PR addition
- Capital letters at beginning
- for loop spacing and brackets
- Functions naming for consistency
- Example following examples template
- Other tweaks
2019-06-29 11:26:08 +02:00
chriscamacho
83a4eb0852 add multi channel audio to raudio (#895)
* added multi channel sound replay to raudio
added -fPIC to Makefile for Linux
added simple lighting and audio multi channel to examples Makefile

* not properly reporting audio buffer pool size...
2019-06-29 10:49:42 +02:00
Wilhem Barbier
dec604bd71 Move jar_xm_reset to jar_xm.h 2019-05-23 16:40:15 +02:00
Wilhem Barbier
78817305c5 Add rewind for the XM music format 2019-05-22 22:16:18 +02:00
Ray
10c2eea14b Correct RL_FREE bug 2019-04-23 15:07:28 +02:00
Ray
e67ebabb02 Support custom memory management macros
Users can define their custom memory management macros.

NOTE: Most external libraries support custom macros in the same way, raylib should redefine those macros to raylib ones, to unify custom memory loading. That redefinition is only implemented as example for stb_image.h in [textures] module.
2019-04-23 14:55:35 +02:00
Ray
b8ada4b877 Review creation years 2019-04-08 12:25:13 +02:00