Ticket #4893 (new bug)
gcc4 BSound on alpha builds can not use media plugins
| Reported by: | Adek336 | Owned by: | marcusoverhagen |
|---|---|---|---|
| Priority: | normal | Milestone: | R1 |
| Component: | Kits/Media Kit | Version: | R1/alpha1 |
| Keywords: | Cc: | ||
| Blocked By: | #4920 | Platform: | All |
| Blocking: | #3437 |
Description
The playsound function comes from the Be book http://www.haikudev.com/bebookpl/The%20Media%20Kit/SoundPlayer.html#BSoundPlayer
#include <Application.h>
#include <Sound.h>
#include <SoundPlayer.h>
#include <Entry.h>
#include <iostream>
using namespace std;
void playsound(const char *path) {
BSound *sound;
BSoundPlayer player;
entry_ref ref;
BEntry entry(path, true);
BSoundPlayer::play_id id;
if (entry.InitCheck() == B_OK) {
if (entry.GetRef(&ref) == B_OK) {
sound = new BSound(&ref);
if (sound->InitCheck() == B_OK) {
player.Start();
player.SetVolume(1.0);
id = player.StartPlaying(sound);
sound->ReleaseRef();
player.WaitForSound(id);
}
}
}
}
int main()
{
new BApplication("application/x-vnd.program");
playsound("/Blank_BFS/sample.wav");
return 0;
}
On the alpha:
< copy a wave file as /Blank_BFS/sample.wav > setgcc gcc4 g++ mkit.cc -lbe -lmedia -o mkit mkit
Problem: the media kit tries to load the gcc2 plugin, does not try to look for a gcc4 plugin.
Also known as #3437, where it happens to gcc2 compiled applications under hybrid4.
Change History
Note: See
TracTickets for help on using
tickets.
