Home > Back-end > Under Windows 7 why playsound is so slow.
Under Windows 7 why playsound is so slow.
Time:09-20
I am making a small tool start input keyboard and playsound asynchronous broadcasting digital wav files, use under xp system is normal, voice broadcast under Windows 7 is slow, often the second number is showed the first wav files did not play, play the second wav files directly,
This exactly is what problem, what's the solution?
CodePudding user response:
Asynchronous broadcasting range is finished playing and then execute the next step, to broadcast, remove SND_ASYNC asynchronous tag can, voice should be fixed length, is slow, test the length of each step is ok,
CodePudding user response:
The wav are loaded into memory, again from memory buffer (pointed out SND_MEMORY logo, so that the first parameter to memory address),
CodePudding user response:
This is Windows 7 the characteristics of the buffer, sometimes go that constantly turn, my, Especially with the disk file, reading is out of sync,
CodePudding user response:
Will play the file cache first, loaded into memory, read directly from memory,
CodePudding user response:
All loaded into memory, and then go directly from memory