static void print_last_error(MMRESULT mmrError, const char* func) { static char buffer_err[TDAV_WAVEAPI_PRODUCER_ERROR_BUFF_COUNT]; waveInGetErrorTextA(mmrError, buffer_err, sizeof(buffer_err)); TSK_DEBUG_ERROR("%s() error: %s", func, buffer_err); }
static const char * wave_in_error(MMRESULT error) { static char msg[1024]; static char long_msg[1100]; MMRESULT rc; rc = waveInGetErrorTextA(error, msg, sizeof(msg)); if (rc != MMSYSERR_NOERROR) sprintf(long_msg, "waveInGetErrorTextA(%x) failed with error %x", error, rc); else sprintf(long_msg, "%s(%s)", mmsys_error(error), msg); return long_msg; }