From f3d24db5c73b9874815e0b7878d86eabb7b31d1b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 22 Feb 2013 02:32:26 +0200 Subject: windows workaround --- sound_detector/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound_detector/main.cpp') diff --git a/sound_detector/main.cpp b/sound_detector/main.cpp index 0c4b489..464f5e5 100644 --- a/sound_detector/main.cpp +++ b/sound_detector/main.cpp @@ -122,7 +122,11 @@ void encode_end(vorbis_params &vparams) std::string time_str() { boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); +#ifndef WIN32 return boost::posix_time::to_simple_string(now); +#else + return boost::posix_time::to_iso_string(now); +#endif } char out_dir[1024] = {0}; @@ -261,6 +265,7 @@ double get_lowest_rate(const PaStreamParameters *inputParameters) int main(int argc, char **argv) { + std::string str = time_str(); PaError err = Pa_Initialize(); if(err != paNoError) { -- cgit v1.2.3