|
- #!/usr/bin/python
- # -*- coding: utf-8 -*-
- from ctypes import windll
- from os import getcwd
- from os.path import exists
- if __name__ == '__main__':
- filepath = getcwd() + r"\bass.dll"
- if exists(filepath):
- dll = windll.LoadLibrary(filepath)
- dll.BASS_Init(-1, 44100, 0, None, None)
- handle = dll.BASS_StreamCreateFile(False, r"F:\KuGou\何晟铭&杜淳 - 爱的供养(男声合唱版).mp3".encode("gbk"), None, None, 0)
- dll.BASS_ChannelPlay(handle, False)
- pos = dll.BASS_ChannelGetLength(handle, 0)
- while dll.BASS_ChannelGetPosition(handle, 0) != pos:
- pass
- dll.BASS_Free()
复制代码
bass.zip
(149.53 KB, 下载次数: 28)
|
|