I have been working with bass.dll from www.un4seen.com as audio library and I can say that it is great. But I have reached a place where I hitted the wall and it will take time for me to move. Can anyone suggest for me a dll library for playing audio files (.wav, .mp3, .wma, .ogg etc) ? Or any module that I can give a go! ::)

Member Avatar for leegeorg07

the simples one is a module already in python called webbrowser that works with urls and audio files and video files e.g.

import webbrowser
webbrowser.open("directory_of_file.file_extension")

this will work with pretty much everything.

If you are wanting video as well then you can use GUI toolkits such as wxPython. This has a wx.MediaCtrl that does the kind of thing you are talking about.

yeah, I have written that kind of program(using wxpy) and is great, but I want something independent like bass.dll and bass video libraries, instead of relying on system. Is there any other known dll rather than

Member Avatar for leegeorg07

i dont think you need it, look at this tutorial in python
i think that explains it

thanks but I want serious audio library that is at least independent of system browser and something like that

Member Avatar for leegeorg07

yea sure i understand but if you don't find any others then you might want to look through that again

There is the Pyglet multimedia module from:
http://www.pyglet.org/index.html
You can download the Windows installer:
http://pyglet.googlecode.com/files/pyglet-1.1.2.msi
and the documentation:
http://pyglet.googlecode.com/files/pyglet-1.1.2-docs.zip


AVbin is a thin wrapper around FFmpeg a collection of audio and video codecs widely used in projects such as mplayer, xine, gstreamer and VLC.
It is needed to play .ogg and .mp3 sound files download:
avbin-win32-5.zip from http://code.google.com/p/avbin/
and install avbin.dll into Windows/System32 directory

AVbin and pyglet are also available for Unix/Linux systems.

Here is a typical pyglet example:

# load and show an animated gif file using module pyglet
# download module pyglet from: http://www.pyglet.org/download.html
# pyglet is available for Windows and Unix/Linux systems
# the animated dinosaur-07.gif file is in the public domain
# download from: http://www.gifanimations.com
# notice that the event loop uses a function decorator

import pyglet

# pick an animated gif file you have in the working directory
ag_file = "dinosaur-07.gif"
animation = pyglet.resource.animation(ag_file)
sprite = pyglet.sprite.Sprite(animation)

win = pyglet.window.Window(width=sprite.width, height=sprite.height)

# set window background color = (r, g, b, alpha)
# each value goes from 0.0 to 1.0
green = (0, 1, 0, 1)
pyglet.gl.glClearColor(*green)

@win.event
def on_draw():
    win.clear()
    sprite.draw()

pyglet.app.run()
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.