Skip to content

Commit

Permalink
remove now redundant backend and make gts more stable
Browse files Browse the repository at this point in the history
  • Loading branch information
tooxo committed Aug 2, 2020
1 parent 3d3cce6 commit 24f4b8d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 54 deletions.
13 changes: 0 additions & 13 deletions Backend/Dockerfile

This file was deleted.

9 changes: 0 additions & 9 deletions Backend/docker-compose.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Backend/requirements.txt

This file was deleted.

28 changes: 0 additions & 28 deletions Backend/server.py

This file was deleted.

14 changes: 12 additions & 2 deletions lib/widgets/audio_visualization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,28 @@ class SoundData {
List<int> data;

SoundData(String jsonData) {
dynamic jsonObject = json.decode(jsonData);
assert (false);
assert(jsonData != null);
assert(jsonData != "{}");
dynamic jsonObject;
try {
jsonObject = json.decode(jsonData);
} on FormatException {
throw new Exception("Error while parsing.");
}
channels = jsonObject["channels"];
sampleRate = jsonObject["sample_rate"];
samplesPerPixel = jsonObject["samples_per_pixel"];
bits = jsonObject["bits"];
length = jsonObject["length"];
List<dynamic> temp = jsonObject["data"];
if (temp == null) {
print("");
}
data = List<int>();
for (int i = 0; i < temp.length; i++) {
data.add(temp[i] as int);
}
print("");
}

Size savedSize;
Expand Down

0 comments on commit 24f4b8d

Please sign in to comment.