Skip to content

Commit

Permalink
Merge pull request #221 from kwesthaus/file-format-documentation
Browse files Browse the repository at this point in the history
File format documentation
  • Loading branch information
miek authored Oct 22, 2023
2 parents e90393b + 7af44bc commit e51d850
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Build instructions can be found here: https://github.com/miek/inspectrum/wiki/Bu
## Input
inspectrum supports the following file types:
* `*.sigmf-meta, *.sigmf-data` - SigMF recordings
* `*.cf32`, `*.cfile` - Complex 32-bit floating point samples (GNU Radio, osmocom_fft)
* `*.cf64` - Complex 64-bit floating point samples
* `*.cs32` - Complex 16-bit signed integer samples (SDRAngel)
* `*.cs16` - Complex 16-bit signed integer samples (BladeRF)
* `*.cs8` - Complex 8-bit signed integer samples (HackRF)
* `*.cu8` - Complex 8-bit unsigned integer samples (RTL-SDR)
* `*.cf32`, `*.fc32`, `*.cfile` - Complex 32-bit floating point samples (GNU Radio, osmocom_fft)
* `*.cf64`, `*.fc64` - Complex 64-bit floating point samples
* `*.cs32`, `*.sc32`, `*.c32` - Complex 32-bit signed integer samples (SDRAngel)
* `*.cs16`, `*.sc16`, `*.c16` - Complex 16-bit signed integer samples (BladeRF)
* `*.cs8`, `*.sc8`, `*.c8` - Complex 8-bit signed integer samples (HackRF)
* `*.cu8`, `*.uc8` - Complex 8-bit unsigned integer samples (RTL-SDR)
* `*.f32` - Real 32-bit floating point samples
* `*.f64` - Real 64-bit floating point samples (MATLAB)
* `*.s16` - Real 16-bit signed integer samples
Expand Down
3 changes: 3 additions & 0 deletions src/inputsource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ void InputSource::openFile(const char *filename)
else if ((suffix == "cf64") || (suffix == "fc64")) {
sampleAdapter = std::make_unique<ComplexF64SampleAdapter>();
}
else if ((suffix == "cs32") || (suffix == "sc32") || (suffix == "c32")) {
sampleAdapter = std::make_unique<ComplexS32SampleAdapter>();
}
else if ((suffix == "cs16") || (suffix == "sc16") || (suffix == "c16")) {
sampleAdapter = std::make_unique<ComplexS16SampleAdapter>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ int main(int argc, char *argv[])
QCoreApplication::translate("main", "Hz"));
parser.addOption(rateOption);
QCommandLineOption formatOption(QStringList() << "f" << "format",
QCoreApplication::translate("main", "Set file format."),
QCoreApplication::translate("main", "Set file format, options: cfile/cf32/fc32, cf64/fc64, cs32/sc32/c32, cs16/sc16/c16, cs8/sc8/c8, cu8/uc8, f32, f64, s16, s8, u8, sigmf-meta/sigmf-data."),
QCoreApplication::translate("main", "fmt"));
parser.addOption(formatOption);

Expand Down

0 comments on commit e51d850

Please # to comment.