-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
176 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.user | ||
*.user.* | ||
*.aps | ||
build-*/ | ||
*.*-pre1 | ||
*.autosave | ||
*.*~ | ||
*.uxf | ||
*.bak | ||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,30 @@ | ||
# qt-spek | ||
# Qt-spek | ||
基于Qt的频谱分析器 | ||
|
||
修改于Spek[官网地址](http://spek.cc), [Github仓库地址](https://github.com/alexkay/spek) | ||
|
||
 | ||
 | ||
 | ||
|
||
## Spectrogram | ||
|
||
`c`, `C` | ||
: Change the audio channel. | ||
|
||
`f`, `F` | ||
: Change the DFT window function. | ||
|
||
`l`, `L` | ||
: Change the lower limit of the dynamic range in dBFS. | ||
|
||
`p`, `P` | ||
: Change the palette. | ||
|
||
`s`, `S` | ||
: Change the audio stream. | ||
|
||
`u`, `U` | ||
: Change the upper limit of the dynamic range in dBFS. | ||
|
||
`w`, `W` | ||
: Change the DFT window size. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#include <assert.h> | ||
#include <stdlib.h> | ||
|
||
#include "spek-utils.h" | ||
|
||
int spek_vercmp(const char *a, const char *b) | ||
{ | ||
assert(a && b); | ||
|
||
if (!*a && !*b) { | ||
return 0; | ||
} | ||
if (!*a) { | ||
return -1; | ||
} | ||
if (!*b) { | ||
return 1; | ||
} | ||
|
||
char *i, *j; | ||
while(1) { | ||
i = j = NULL; | ||
long x = strtol(a, &i, 10); | ||
long y = strtol(b, &j, 10); | ||
|
||
if (x < y) { | ||
return -1; | ||
} | ||
if (x > y) { | ||
return 1; | ||
} | ||
|
||
if (!*i && !*j) { | ||
return 0; | ||
} | ||
if (!*i) { | ||
return -1; | ||
} | ||
if (!*j) { | ||
return 1; | ||
} | ||
|
||
a = i + 1; | ||
b = j + 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#pragma once | ||
|
||
inline int spek_max(int a, int b) | ||
{ | ||
return a > b ? a : b; | ||
} | ||
|
||
inline int spek_min(int a, int b) | ||
{ | ||
return a < b ? a : b; | ||
} | ||
|
||
// Compare version numbers, e.g. 1.9.2 < 1.10.0 | ||
int spek_vercmp(const char *a, const char *b); |