Exemplo n.º 1
0
import os, sys, ctypes, platform
from . import pybass

QWORD = pybass.QWORD
HSYNC = pybass.HSYNC
HSTREAM = pybass.HSTREAM
DOWNLOADPROC = pybass.DOWNLOADPROC
SYNCPROC = pybass.SYNCPROC
BASS_FILEPROCS = pybass.BASS_FILEPROCS

from .paths import x86_path, x64_path
import libloader

bassmix_module = libloader.load_library('bassmix', x86_path=x86_path, x64_path=x64_path)
func_type = libloader.get_functype()
	
# additional BASS_SetConfig option
BASS_CONFIG_MIXER_FILTER = 0x10600
BASS_CONFIG_MIXER_BUFFER = 0x10601
BASS_CONFIG_SPLIT_BUFFER = 0x10610

# BASS_Mixer_StreamCreate flags
BASS_MIXER_END = 0x10000# end the stream when there are no sources
BASS_MIXER_NONSTOP = 0x20000# don't stall when there are no sources
BASS_MIXER_RESUME = 0x1000# resume stalled immediately upon new/unpaused source

# source flags
BASS_MIXER_FILTER = 0x1000# resampling filter
BASS_MIXER_BUFFER = 0x2000# buffer data for BASS_Mixer_ChannelGetData/Level
BASS_MIXER_LIMIT = 0x4000# limit mixer processing to the amount available from this source
Exemplo n.º 2
0
Supported tags:
---------------
  MP3 ID3v1 and ID3v2.2/3/4
  OGG/FLAC comments
  WMA
  APE, OFR, MPC, AAC - all use APE tags
  MP4
  MOD/etc titles
'''

import sys, ctypes, platform
from paths import x86_path, x64_path
import libloader
tags_module = libloader.load_library('tags', x86_path=x86_path, x64_path=x64_path)
func_type = libloader.get_functype()# Current version. Just increments each release.

TAGS_VERSION = 17

# returns description of the last error.
#const char*  _stdcall TAGS_GetLastErrorDesc();
TAGS_GetLastErrorDesc = func_type(ctypes.c_char_p)(('TAGS_GetLastErrorDesc', tags_module))

# main purpose of this library
#const char*  _stdcall TAGS_Read( DWORD dwHandle, const char* fmt );
TAGS_Read = func_type(ctypes.c_char_p, ctypes.c_ulong, ctypes.c_char_p)(('TAGS_Read', tags_module))

# retrieves the current version
#DWORD _stdcall TAGS_GetVersion();
TAGS_GetVersion = func_type(ctypes.c_ulong)(('TAGS_GetVersion', tags_module))