| 80 | |
| 81 | |
| 82 | bool FCEUI_BeginWaveRecord(const char *fn) |
| 83 | { |
| 84 | int r; |
| 85 | |
| 86 | if(!(soundlog=FCEUD_UTF8fopen(fn,"wb"))) |
| 87 | return false; |
| 88 | wsize=0; |
| 89 | |
| 90 | |
| 91 | /* Write the header. */ |
| 92 | fputs("RIFF",soundlog); |
| 93 | fseek(soundlog,4,SEEK_CUR); // Skip size |
| 94 | fputs("WAVEfmt ",soundlog); |
| 95 | |
| 96 | fputc(0x10,soundlog); |
| 97 | fputc(0,soundlog); |
| 98 | fputc(0,soundlog); |
| 99 | fputc(0,soundlog); |
| 100 | |
| 101 | fputc(1,soundlog); // PCM |
| 102 | fputc(0,soundlog); |
| 103 | |
| 104 | fputc(1,soundlog); // Monophonic |
| 105 | fputc(0,soundlog); |
| 106 | |
| 107 | r=FSettings.SndRate; |
| 108 | fputc(r&0xFF,soundlog); |
| 109 | fputc((r>>8)&0xFF,soundlog); |
| 110 | fputc((r>>16)&0xFF,soundlog); |
| 111 | fputc((r>>24)&0xFF,soundlog); |
| 112 | r<<=1; |
| 113 | fputc(r&0xFF,soundlog); |
| 114 | fputc((r>>8)&0xFF,soundlog); |
| 115 | fputc((r>>16)&0xFF,soundlog); |
| 116 | fputc((r>>24)&0xFF,soundlog); |
| 117 | fputc(2,soundlog); |
| 118 | fputc(0,soundlog); |
| 119 | fputc(16,soundlog); |
| 120 | fputc(0,soundlog); |
| 121 | |
| 122 | fputs("data",soundlog); |
| 123 | fseek(soundlog,4,SEEK_CUR); |
| 124 | |
| 125 | return true; |
| 126 | } |
| 127 | |
| 128 | bool FCEUI_WaveRecordRunning(void) |
| 129 | { |
no test coverage detected