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
776d7ddd
Commit
776d7ddd
authored
Jan 19, 2021
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation errors with the C++ build.
parent
d8c2135e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
research/miniaudio_engine.h
research/miniaudio_engine.h
+7
-5
No files found.
research/miniaudio_engine.h
View file @
776d7ddd
...
@@ -3142,7 +3142,7 @@ MA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state)
...
@@ -3142,7 +3142,7 @@ MA_API ma_result ma_node_set_state(ma_node* pNode, ma_node_state state)
return
MA_INVALID_ARGS
;
return
MA_INVALID_ARGS
;
}
}
c89atomic_exchange_i
16
(
&
pNodeBase
->
state
,
state
);
c89atomic_exchange_i
32
(
&
pNodeBase
->
state
,
state
);
return
MA_SUCCESS
;
return
MA_SUCCESS
;
}
}
...
@@ -3155,7 +3155,7 @@ MA_API ma_node_state ma_node_get_state(const ma_node* pNode)
...
@@ -3155,7 +3155,7 @@ MA_API ma_node_state ma_node_get_state(const ma_node* pNode)
return
ma_node_state_stopped
;
return
ma_node_state_stopped
;
}
}
return
c89atomic_load_i16
(
&
pNodeBase
->
state
);
return
(
ma_node_state
)
c89atomic_load_i32
(
&
pNodeBase
->
state
);
}
}
MA_API
ma_result
ma_node_set_state_time
(
ma_node
*
pNode
,
ma_node_state
state
,
ma_uint64
globalTime
)
MA_API
ma_result
ma_node_set_state_time
(
ma_node
*
pNode
,
ma_node_state
state
,
ma_uint64
globalTime
)
...
@@ -8445,11 +8445,13 @@ MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer,
...
@@ -8445,11 +8445,13 @@ MA_API ma_result ma_spatializer_process_pcm_frames(ma_spatializer* pSpatializer,
return
MA_INVALID_ARGS
;
return
MA_INVALID_ARGS
;
}
}
/* Floating point is the only supported format. */
/* Spatialization is not yet implemented. However, do do need to do channel conversion here. */
/* Spatialization is not yet implemented. However, do do need to do channel conversion here. */
if
(
pSpatializer
->
channelsIn
==
pSpatializer
->
channelsOut
)
{
if
(
pSpatializer
->
channelsIn
==
pSpatializer
->
channelsOut
)
{
ma_copy_pcm_frames
(
pFramesOut
,
pFramesIn
,
frameCount
,
ma_format_f32
,
pSpatializer
->
channelsIn
);
ma_copy_pcm_frames
(
pFramesOut
,
pFramesIn
,
frameCount
,
ma_format_f32
,
pSpatializer
->
channelsIn
);
}
else
{
}
else
{
ma_convert_pcm_frames_channels_f32
(
pFramesOut
,
pSpatializer
->
channelsOut
,
pFramesIn
,
pSpatializer
->
channelsIn
,
frameCount
);
ma_convert_pcm_frames_channels_f32
(
(
float
*
)
pFramesOut
,
pSpatializer
->
channelsOut
,
(
const
float
*
)
pFramesIn
,
pSpatializer
->
channelsIn
,
frameCount
);
/* Safe casts to float* because f32 is the only supported format. */
}
}
return
MA_SUCCESS
;
return
MA_SUCCESS
;
...
@@ -8939,7 +8941,7 @@ static void ma_engine_node_process_pcm_frames__group(ma_node* pNode, const float
...
@@ -8939,7 +8941,7 @@ static void ma_engine_node_process_pcm_frames__group(ma_node* pNode, const float
static
ma_uint32
ma_engine_node_get_required_input_frame_count__group
(
ma_node
*
pNode
,
ma_uint32
outputFrameCount
)
static
ma_uint32
ma_engine_node_get_required_input_frame_count__group
(
ma_node
*
pNode
,
ma_uint32
outputFrameCount
)
{
{
ma_uint64
result
=
ma_engine_node_get_required_input_frame_count
(
pNode
,
outputFrameCount
);
ma_uint64
result
=
ma_engine_node_get_required_input_frame_count
(
(
ma_engine_node
*
)
pNode
,
outputFrameCount
);
if
(
result
>
0xFFFFFFFF
)
{
if
(
result
>
0xFFFFFFFF
)
{
result
=
0xFFFFFFFF
;
/* Will never happen because miniaudio will only ever process in relatively small chunks. */
result
=
0xFFFFFFFF
;
/* Will never happen because miniaudio will only ever process in relatively small chunks. */
}
}
...
@@ -9458,7 +9460,7 @@ MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePa
...
@@ -9458,7 +9460,7 @@ MA_API ma_result ma_engine_play_sound_ex(ma_engine* pEngine, const char* pFilePa
ma_sound_uninit
(
&
pNextSound
->
sound
);
ma_sound_uninit
(
&
pNextSound
->
sound
);
}
else
{
}
else
{
/* No sound available for recycling. Allocate one now. */
/* No sound available for recycling. Allocate one now. */
pSound
=
ma_malloc
(
sizeof
(
*
pSound
),
&
pEngine
->
allocationCallbacks
);
pSound
=
(
ma_sound_inlined
*
)
ma_malloc
(
sizeof
(
*
pSound
),
&
pEngine
->
allocationCallbacks
);
}
}
if
(
pSound
!=
NULL
)
{
/* Safety check for the allocation above. */
if
(
pSound
!=
NULL
)
{
/* Safety check for the allocation above. */
...
...
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