v1.0
This commit is contained in:
parent
97db48dd7f
commit
d1a8058515
@ -50,18 +50,18 @@ def push_ogg(ogg_file):
|
||||
icecast.open()
|
||||
with open(ogg_file, 'rb') as ogg:
|
||||
total = 0
|
||||
print("- Reading 4096 bytes")
|
||||
# print("- Reading 4096 bytes")
|
||||
new_buff = ogg.read(4096)
|
||||
while True:
|
||||
cur_buff = new_buff
|
||||
print("- Reading next 4096 bytes")
|
||||
# print("- Reading next 4096 bytes")
|
||||
new_buff = ogg.read(4096)
|
||||
total += len(cur_buff)
|
||||
if len(cur_buff) == 0:
|
||||
print(" - Buffer is empty: EOF")
|
||||
print(" - Sent: {} bytes".format(total))
|
||||
break
|
||||
print("- Sending 4096 bytes")
|
||||
# print("- Sending 4096 bytes")
|
||||
icecast.send(cur_buff)
|
||||
icecast.sync()
|
||||
|
||||
@ -84,7 +84,7 @@ def main():
|
||||
oord = ord(letter)
|
||||
freq, duration = notes_table(oord)
|
||||
if oord not in args.exclude:
|
||||
print("Caractère: {} | Ord: {} | Fréquence: {} | Durée: {}".format(letter, oord, freq, duration))
|
||||
# print("Caractère: {} | Ord: {} | Fréquence: {} | Durée: {}".format(letter, oord, freq, duration))
|
||||
wave_file.writeframes(sine_wave(frequency=freq, duration=duration))
|
||||
result = convert2ogg(wav_output, ogg_output)
|
||||
if result == 0:
|
||||
|
Loading…
Reference in New Issue
Block a user