@@ -7942,13 +7962,31 @@ mal_result mal_device_init__winmm(mal_context* pContext, mal_device_type type, m
...
@@ -7942,13 +7962,31 @@ mal_result mal_device_init__winmm(mal_context* pContext, mal_device_type type, m
// Latency with WinMM seems pretty bad from my testing... Need to increase the default buffer size.
// Latency with WinMM seems pretty bad from my testing... Need to increase the default buffer size.
if (pDevice->usingDefaultBufferSize) {
if (pDevice->usingDefaultBufferSize) {
if(pDevice->type==mal_device_type_playback){
// CPU speed is a factor to consider when determine how large of a buffer we need.
pDevice->bufferSizeInFrames*=4;// <-- Might need to fiddle with this to find a more ideal value. May even be able to just add a fixed amount rather than scaling.
// if (pDevice->type == mal_device_type_playback) {
// pDevice->bufferSizeInFrames *= 4; // <-- Might need to fiddle with this to find a more ideal value. May even be able to just add a fixed amount rather than scaling.
// } else {
// pDevice->bufferSizeInFrames *= 2;
// }
//}
// The size of the intermediary buffer needs to be able to fit every fragment.
// The size of the intermediary buffer needs to be able to fit every fragment.