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
2a79d124
Commit
2a79d124
authored
Feb 24, 2025
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some bugs in the resource_manager_advanced example.
parent
8261dc89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
examples/resource_manager_advanced.c
examples/resource_manager_advanced.c
+12
-1
No files found.
examples/resource_manager_advanced.c
View file @
2a79d124
...
...
@@ -40,6 +40,10 @@ static ma_result ma_data_source_read_pcm_frames_f32_ex(ma_data_source* pDataSour
ma_uint64
totalFramesRead
;
ma_uint8
temp
[
MA_DATA_CONVERTER_STACK_BUFFER_SIZE
];
ma_uint64
tempCapInFrames
=
sizeof
(
temp
)
/
ma_get_bytes_per_frame
(
dataSourceFormat
,
dataSourceChannels
);
if
(
pFramesRead
!=
NULL
)
{
*
pFramesRead
=
0
;
}
totalFramesRead
=
0
;
while
(
totalFramesRead
<
frameCount
)
{
...
...
@@ -49,7 +53,10 @@ static ma_result ma_data_source_read_pcm_frames_f32_ex(ma_data_source* pDataSour
framesToRead
=
tempCapInFrames
;
}
result
=
ma_data_source_read_pcm_frames
(
pDataSource
,
pFramesOut
,
framesToRead
,
&
framesJustRead
);
result
=
ma_data_source_read_pcm_frames
(
pDataSource
,
temp
,
framesToRead
,
&
framesJustRead
);
if
(
result
!=
MA_SUCCESS
)
{
break
;
}
ma_convert_pcm_frames_format
(
ma_offset_pcm_frames_ptr_f32
(
pFramesOut
,
totalFramesRead
,
dataSourceChannels
),
ma_format_f32
,
temp
,
dataSourceFormat
,
framesJustRead
,
dataSourceChannels
,
ma_dither_mode_none
);
totalFramesRead
+=
framesJustRead
;
...
...
@@ -59,6 +66,10 @@ static ma_result ma_data_source_read_pcm_frames_f32_ex(ma_data_source* pDataSour
}
}
if
(
pFramesRead
!=
NULL
)
{
*
pFramesRead
=
totalFramesRead
;
}
return
MA_SUCCESS
;
}
}
...
...
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