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
54446d73
Commit
54446d73
authored
Feb 25, 2018
by
David Reid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mal_dsp_config_init_ex().
parent
a321e6a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
mini_al.h
mini_al.h
+16
-4
No files found.
mini_al.h
View file @
54446d73
...
...
@@ -1484,6 +1484,7 @@ mal_uint64 mal_convert_frames(void* pOut, mal_format formatOut, mal_uint32 chann
// Helper for initializing a mal_dsp_config object.
mal_dsp_config
mal_dsp_config_init
(
mal_format
formatIn
,
mal_uint32
channelsIn
,
mal_uint32
sampleRateIn
,
mal_format
formatOut
,
mal_uint32
channelsOut
,
mal_uint32
sampleRateOut
);
mal_dsp_config
mal_dsp_config_init_ex
(
mal_format
formatIn
,
mal_uint32
channelsIn
,
mal_uint32
sampleRateIn
,
mal_uint8
channelMapIn
[
MAL_MAX_CHANNELS
],
mal_format
formatOut
,
mal_uint32
channelsOut
,
mal_uint32
sampleRateOut
,
mal_uint8
channelMapOut
[
MAL_MAX_CHANNELS
]);
...
...
@@ -11393,6 +11394,11 @@ mal_uint64 mal_convert_frames(void* pOut, mal_format formatOut, mal_uint32 chann
}
mal_dsp_config
mal_dsp_config_init
(
mal_format
formatIn
,
mal_uint32
channelsIn
,
mal_uint32
sampleRateIn
,
mal_format
formatOut
,
mal_uint32
channelsOut
,
mal_uint32
sampleRateOut
)
{
return
mal_dsp_config_init_ex
(
formatIn
,
channelsIn
,
sampleRateIn
,
NULL
,
formatOut
,
channelsOut
,
sampleRateOut
,
NULL
);
}
mal_dsp_config
mal_dsp_config_init_ex
(
mal_format
formatIn
,
mal_uint32
channelsIn
,
mal_uint32
sampleRateIn
,
mal_uint8
channelMapIn
[
MAL_MAX_CHANNELS
],
mal_format
formatOut
,
mal_uint32
channelsOut
,
mal_uint32
sampleRateOut
,
mal_uint8
channelMapOut
[
MAL_MAX_CHANNELS
])
{
mal_dsp_config
config
;
mal_zero_object
(
&
config
);
...
...
@@ -11402,6 +11408,12 @@ mal_dsp_config mal_dsp_config_init(mal_format formatIn, mal_uint32 channelsIn, m
config
.
formatOut
=
formatOut
;
config
.
channelsOut
=
channelsOut
;
config
.
sampleRateOut
=
sampleRateOut
;
if
(
channelMapIn
!=
NULL
)
{
mal_copy_memory
(
config
.
channelMapIn
,
channelMapIn
,
sizeof
(
config
.
channelMapIn
));
}
if
(
channelMapOut
!=
NULL
)
{
mal_copy_memory
(
config
.
channelMapIn
,
channelMapIn
,
sizeof
(
config
.
channelMapIn
));
}
return
config
;
}
...
...
@@ -11519,9 +11531,9 @@ mal_result mal_decoder__init_dsp(mal_decoder* pDecoder, const mal_decoder_config
// DSP.
mal_dsp_config
dspConfig
=
mal_dsp_config_init
(
pDecoder
->
internalFormat
,
pDecoder
->
internalChannels
,
pDecoder
->
internalSampleRate
,
pDecoder
->
outputFormat
,
pDecoder
->
outputChannels
,
pDecoder
->
outputSampleRate
);
mal_copy_memory
(
dspConfig
.
channelMapIn
,
pDecoder
->
internalChannelMap
,
sizeof
(
pDecoder
->
internalChannelMap
));
mal_copy_memory
(
dspConfig
.
channelMapOut
,
pDecoder
->
outputChannelMap
,
sizeof
(
pDecoder
->
outputChannelMap
)
);
mal_dsp_config
dspConfig
=
mal_dsp_config_init
_ex
(
pDecoder
->
internalFormat
,
pDecoder
->
internalChannels
,
pDecoder
->
internalSampleRate
,
pDecoder
->
internalChannelMap
,
pDecoder
->
outputFormat
,
pDecoder
->
outputChannels
,
pDecoder
->
outputSampleRate
,
pDecoder
->
outputChannelMap
);
return
mal_dsp_init
(
&
dspConfig
,
onRead
,
pDecoder
,
&
pDecoder
->
dsp
);
}
...
...
@@ -12883,7 +12895,7 @@ void mal_pcm_f32_to_s32(int* pOut, const float* pIn, unsigned int count)
// v0.xx - 2018-xx-xx
// - API CHANGE: Change mal_src_read_frames() and mal_dsp_read_frames() to use 64-bit sample counts.
// - Add decoder APIs for loading WAV, FLAC, Vorbis and MP3 files.
// - Allow
creation
of devices without a context.
// - Allow
opening
of devices without a context.
// - In this case the context is created and managed internally by the device.
// - Fix build errors with macOS.
//
...
...
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