Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
miniaudio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
miniaudio
Commits
ea84294d
Commit
ea84294d
authored
Jun 24, 2021
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the custom_backend example.
parent
5551dc67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
examples/custom_backend.c
examples/custom_backend.c
+8
-7
No files found.
examples/custom_backend.c
View file @
ea84294d
...
@@ -37,9 +37,12 @@ void main_loop__em()
...
@@ -37,9 +37,12 @@ void main_loop__em()
/* Support SDL on everything. */
/* Support SDL on everything. */
#define MA_SUPPORT_SDL
#define MA_SUPPORT_SDL
/* Only enable SDL if it's hasn't been explicitly disabled (MA_NO_SDL) and it's supported at compile time (MA_SUPPORT_SDL). */
/*
#if !defined(MA_NO_SDL) && defined(MA_SUPPORT_SDL)
Only enable SDL if it's hasn't been explicitly disabled (MA_NO_SDL) or enabled (MA_ENABLE_SDL with
#define MA_ENABLE_SDL
MA_ENABLE_ONLY_SPECIFIC_BACKENDS) and it's supported at compile time (MA_SUPPORT_SDL).
*/
#if defined(MA_SUPPORT_SDL) && !defined(MA_NO_SDL) && (!defined(MA_ENABLE_ONLY_SPECIFIC_BACKENDS) || defined(MA_ENABLE_SDL))
#define MA_HAS_SDL
#endif
#endif
...
@@ -75,9 +78,7 @@ typedef struct
...
@@ -75,9 +78,7 @@ typedef struct
#if defined(MA_ENABLE_SDL)
#if defined(MA_HAS_SDL)
#define MA_HAS_SDL
/* SDL headers are necessary if using compile-time linking. */
/* SDL headers are necessary if using compile-time linking. */
#ifdef MA_NO_RUNTIME_LINKING
#ifdef MA_NO_RUNTIME_LINKING
#ifdef __has_include
#ifdef __has_include
...
@@ -331,7 +332,7 @@ void ma_audio_callback_playback__sdl(void* pUserData, ma_uint8* pBuffer, int buf
...
@@ -331,7 +332,7 @@ void ma_audio_callback_playback__sdl(void* pUserData, ma_uint8* pBuffer, int buf
MA_ASSERT
(
pDeviceEx
!=
NULL
);
MA_ASSERT
(
pDeviceEx
!=
NULL
);
ma_device_handle_backend_data_callback
((
ma_device
*
)
pDeviceEx
,
pBuffer
,
NULL
,
(
ma_uint32
)
bufferSizeInBytes
/
ma_get_bytes_per_frame
(
pDeviceEx
->
device
.
capture
.
internalFormat
,
pDeviceEx
->
device
.
capture
.
internalChannels
));
ma_device_handle_backend_data_callback
((
ma_device
*
)
pDeviceEx
,
pBuffer
,
NULL
,
(
ma_uint32
)
bufferSizeInBytes
/
ma_get_bytes_per_frame
(
pDeviceEx
->
device
.
playback
.
internalFormat
,
pDeviceEx
->
device
.
playback
.
internalChannels
));
}
}
static
ma_result
ma_device_init_internal__sdl
(
ma_device_ex
*
pDeviceEx
,
const
ma_device_config
*
pConfig
,
ma_device_descriptor
*
pDescriptor
)
static
ma_result
ma_device_init_internal__sdl
(
ma_device_ex
*
pDeviceEx
,
const
ma_device_config
*
pConfig
,
ma_device_descriptor
*
pDescriptor
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment