MCPcopy Create free account
hub / github.com/TASEmulators/fceux / wavRecordStart

Method wavRecordStart

src/drivers/Qt/ConsoleWindow.cpp:4131–4176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4129}
4130
4131void consoleWin_t::wavRecordStart(void)
4132{
4133 if ( !FCEUI_WaveRecordRunning() )
4134 {
4135 const char *romFile;
4136 std::string fileName;
4137
4138 romFile = getRomFile();
4139
4140 if ( romFile )
4141 {
4142 char base[512];
4143 const char *baseDir = FCEUI_GetBaseDirectory();
4144 std::string lastPath;
4145
4146 getFileBaseName( romFile, base );
4147
4148 g_config->getOption ("SDL.WavFilePath", &lastPath);
4149
4150 if ( lastPath.size() > 0 )
4151 {
4152 fileName.assign( lastPath );
4153 fileName.append( "/" );
4154 }
4155 else if ( baseDir )
4156 {
4157 fileName.assign( baseDir );
4158 fileName.append( "/wav/" );
4159 }
4160 else
4161 {
4162 fileName.clear();
4163 }
4164 fileName.append( base );
4165 fileName.append(".wav");
4166 //printf("WAV Filepath:'%s'\n", fileName );
4167 }
4168 else
4169 {
4170 return;
4171 }
4172 FCEU_WRAPPER_LOCK();
4173 FCEUI_BeginWaveRecord( fileName.c_str() );
4174 FCEU_WRAPPER_UNLOCK();
4175 }
4176}
4177
4178void consoleWin_t::wavRecordAsStart(void)
4179{

Callers

nothing calls this directly

Calls 8

FCEUI_WaveRecordRunningFunction · 0.85
FCEUI_GetBaseDirectoryFunction · 0.85
getFileBaseNameFunction · 0.85
FCEUI_BeginWaveRecordFunction · 0.85
getOptionMethod · 0.80
getRomFileFunction · 0.70
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected