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