whitespace fixup

master
jan 7 years ago
parent f04c214e63
commit c03ac6050c

@ -24,7 +24,6 @@ def main(in_file, out_file, dll_path=None):
dll_path = 'C:/Program Files (x86)/Audible/Bin/AAXSDKWin.dll' dll_path = 'C:/Program Files (x86)/Audible/Bin/AAXSDKWin.dll'
dll = ctypes.CDLL(dll_path) dll = ctypes.CDLL(dll_path)
handle = open_file(dll, in_file) handle = open_file(dll, in_file)
a = (dll, handle) a = (dll, handle)
@ -34,13 +33,13 @@ def main(in_file, out_file, dll_path=None):
authenticate(*a) authenticate(*a)
print('c', channels, 's', sample_rate) print('c', channels, 's', sample_rate)
n_chapters = get_chapter_count(*a) n_chapters = get_chapter_count(*a)
chapter_times = [get_chapter_start_time(*a, i) for i in range(n_chapters)] chapter_times = [get_chapter_start_time(*a, i) for i in range(n_chapters)]
with open(out_file + '.txt', 'w') as f: with open(out_file + '.txt', 'w') as f:
[f.write(str(ti) + '\n') for ti in chapter_times] [f.write(str(ti) + '\n') for ti in chapter_times]
enc_buf = ctypes.create_string_buffer(0x400) enc_buf = ctypes.create_string_buffer(0x400)
dec_buf = ctypes.create_string_buffer(0x400 * 200) dec_buf = ctypes.create_string_buffer(0x400 * 200)
@ -154,7 +153,7 @@ def get_chapter_text(dll, handle, chapter_num, buf=None):
if data_len.value == 0: if data_len.value == 0:
return '' return ''
if res != 0: if res != 0:
raise Exception('AAXGetChapterText: {}'.format(res)) raise Exception('AAXGetChapterText: {}'.format(res))
@ -252,4 +251,3 @@ def get_max_bitrate(dll, handle):
raise Exception('AAXGetAvgBitrate: {}'.format(res)) raise Exception('AAXGetAvgBitrate: {}'.format(res))
return bitrate.value return bitrate.value

Loading…
Cancel
Save