minor changes
This commit is contained in:
@@ -113,15 +113,23 @@ class TrackerModule extends InfoModule {
|
||||
{
|
||||
// Testing some audio stuff
|
||||
Uint8List? audioBytes = liveInformation.announcementModule.announcementCache[nearestStop!.getAudioFileName()];
|
||||
AudioWrapperByteSource audioSource = AudioWrapperByteSource(audioBytes!);
|
||||
|
||||
AudioWrapper audio = AudioWrapper();
|
||||
if (audioBytes != null) {
|
||||
AudioWrapperByteSource audioSource = AudioWrapperByteSource(audioBytes!);
|
||||
|
||||
await audio.loadSource(audioSource);
|
||||
AudioWrapper audio = AudioWrapper();
|
||||
|
||||
await audio.loadSource(audioSource);
|
||||
|
||||
duration = await audio.getDuration();
|
||||
|
||||
print("Duration of audio: $duration");
|
||||
} else {
|
||||
print("Audio bytes are null");
|
||||
duration = Duration(seconds: 0);
|
||||
}
|
||||
|
||||
duration = await audio.getDuration();
|
||||
|
||||
print("Duration of audio: $duration");
|
||||
}
|
||||
|
||||
// get the estimated distance travelled in 5 seconds, in meters
|
||||
|
||||
Reference in New Issue
Block a user