mirror of
				https://github.com/AlexandreRouma/SDRPlusPlus.git
				synced 2025-10-30 00:18:10 +01:00 
			
		
		
		
	Merge pull request #85 from nonoo/master
Fix file source rewind and read after it is finished
This commit is contained in:
		| @@ -12,6 +12,8 @@ file(GLOB_RECURSE SRC "src/*.cpp" "src/*.c") | ||||
| include_directories("src/") | ||||
| include_directories("src/libcorrect/") | ||||
|  | ||||
| set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") | ||||
|  | ||||
| add_library(falcon9_decoder SHARED ${SRC}) | ||||
| target_link_libraries(falcon9_decoder PRIVATE sdrpp_core) | ||||
| set_target_properties(falcon9_decoder PROPERTIES PREFIX "") | ||||
|   | ||||
| @@ -43,6 +43,7 @@ public: | ||||
|         file.read(_data, size); | ||||
|         int read = file.gcount(); | ||||
|         if (read < size) { | ||||
|             file.clear(); | ||||
|             file.seekg(sizeof(WavHeader_t)); | ||||
|             file.read(&_data[read], size - read); | ||||
|         } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user