the program sounds well.
main.cpp Thu Jun 03 18:48:13 2021 1 :#include2 :#include 3 :#include 4 :#include 5 ://#include 6 ://#include 7 : 8 :#include "array_counter.h" 9 :#include "sender.h" 10 :#include "Print.h" 11 : 12 :#include "sounds-011.h" 13 :#include "sounds_schema.h" 14 : 15 ://#pragma comment(lib, "Winmm.lib") 16 : 17 :using namespace std; 18 ://dummy 19 :HWAVEOUT am_waveOut; // Handle to sound card output 20 :WAVEFORMATEX am_waveFormat; // The sound format 21 :WAVEHDR am_waveHeader; // WAVE header for our sound data 22 :HANDLE am_done; // Event Handle that tells us the sound has finished being played. 23 : 24 : 25 ://int sbuffer[11025 * 2]; 26 : 27 : 28 : 29 ://dummy 30 :void play_001(); 31 : ... 119 : 120 :int main_001() { 121 : int size = 2200.0f; 122 : float add = 2200.0f / 12.0f; 123 : 124 : for ( int i=0; i<25; i++ ) { 125 : err_msg_001 ("int sbuffer_%03d[ %d * 2 ] ;\r\n", i, (int)size); 126 : size += add; 127 : } 128 : 129 : size = 2200.0f; 130 : for ( int i=0; i<25; i++ ) { 131 : err_msg_001 ("sound_%03d = new SoundEffect( sbuffer_%03d, %d * 2 );\r\n", i, i, (int)size); 132 : size += add; 133 : } 134 : return 0; 135 :} 136 : 137 :// Very Thanks to https://stackoverflow.com/questions/19894384/simple-sounds-in-c?newreg=f9687df41b574a8f8f34db83b5c4a16a 138 :// > mingw32-g++.exe main.o .\sounds-011.o -o winmain_011.exe 139 :int main(int argc, char** argv) { 140 : 141 : err_msg_001("main starts.\r\n"); 142 : itnitialize_sounds() ; 143 : 144 : err_msg_001("arg[1]=%s\r\n", argv[1]); 145 : m_mode = atoi(argv[1]); 146 : sounds_schema(); 147 : 148 : err_msg_001("main ends.\r\n"); 149 : return 0; 150 :} 151 :