Hi, I'm using the audiere 1.9.4 library to build a new
player. I'm trying
to wrap the classes in the library within my own class
design. It seems I'm
having trouble with the namespaces. When I run the
example simple.cpp that
comes with the library there isn't any problem at all.
But when I use it
inside my namespaces, it compiles and links okay but in
runtime there is no
sound at all. Following I present you the code. I
have a problem when I'm
creating a new device. In my code I use a namespace
"base::audio", with my
class called AudierePlayer:
namespace base {
namespace audio {
AudierePlayer::AudierePlayer(Device newDevice,
Resource
newResource) {
const char* deviceTemp = newDevice;
char* parameters = "";
const char* resource =
"/home/teratux/workspace/audiere1/samples/track01.mp3";
audiere::AudioDevicePtr device =
audiere::OpenDevice(deviceTemp,parameters);
sound = audiere::OpenSound(device, resource);
}
.
.
.
.
In the last example audiere doesn't create a sound
device for me, but in
this one:
namespace base {
namespace audio {
AudierePlayer::AudierePlayer(Device newDevice,
Resource
newResource, audiere::AudioDevicePtr device) {
const char* deviceTemp = newDevice;
char* parameters = "";
const char* resource =
"/home/teratux/workspace/audiere1/samples/track01.mp3";
sound = audiere::OpenSound(device, resource);
}
.
.
.
It plays ok. Any idea why this happens?
thanks,