Author Variable gesetzt, sowie Bugfixed, wenn Audiodatei nicht vorhanden.

This commit is contained in:
david_g 2021-02-06 14:27:09 +01:00
parent ab91ef12bb
commit a48915cca6
2 changed files with 1228 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,18 @@
"""This is a fully functional hotel system from the Grand Budapest Hotel."""
__author__ = "7509429, Gebert, 0000000, YYYYY"
__email__ = "0000000@stud.uni-frankfurt.de"
__email__ = "s6474549@stud.uni-frankfurt.de"
__credit__ = " Grandhotel.wav by David Gebert "
import math
import os
import sys
import time
import random
#----------------CLASS---KEY------------------------------------------
@ -644,10 +653,14 @@ def play_sound():
None if no sound plays."""
if imported:
wave_obj = simpleaudio.WaveObject.from_wave_file\
try:
wave_obj = simpleaudio.WaveObject.from_wave_file\
(os.path.join(dir_path, "grandhotel.wav"))
play_obj = wave_obj.play()
return play_obj
play_obj = wave_obj.play()
return play_obj
except:
print("Audiodatei nicht gefunden.")
return None