Click here to Skip to main content
16,005,037 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Is it possible of removing menues from a CDockablePane??? Pin
Randor 5-Nov-09 11:53
professional Randor 5-Nov-09 11:53 
GeneralRe: Is it possible of removing menues from a CDockablePane??? Pin
«_Superman_»5-Nov-09 11:56
professional«_Superman_»5-Nov-09 11:56 
JokeRe: Is it possible of removing menues from a CDockablePane??? Pin
Randor 5-Nov-09 12:05
professional Randor 5-Nov-09 12:05 
JokeRe: Is it possible of removing menues from a CDockablePane??? Pin
«_Superman_»5-Nov-09 12:06
professional«_Superman_»5-Nov-09 12:06 
AnswerRe: Is it possible of removing menues from a CDockablePane??? Pin
«_Superman_»5-Nov-09 11:54
professional«_Superman_»5-Nov-09 11:54 
QuestionSound programming issue. Pin
GLGunblade5-Nov-09 9:27
GLGunblade5-Nov-09 9:27 
QuestionRe: Sound programming issue. Pin
David Crow5-Nov-09 9:40
David Crow5-Nov-09 9:40 
AnswerRe: Sound programming issue. Pin
GLGunblade5-Nov-09 12:02
GLGunblade5-Nov-09 12:02 
I'm not sure that would work.

I did try but unsuccessfully because of this:


if (flag==1)
	{
			oggPlayer1.Update();  // Ogg player update
	}

	if  (flag==2)
	{
			oggPlayer2.Update();  // Ogg player update
	}


each instance must have it's own update.
I did try usuing brackets round the while loop but it still won't work.
The changed code looks like this.

if (flag==0)
	{
	oggPlayer1.Play();
	flag=1;
	while (oggPlayer1.StoppedPlaying()==true)
	{
	oggPlayer1.Close();
	flag=2;
	}
	}

	if (flag==2)
	{
	oggPlayer2.Play();
	while (oggPlayer2.StoppedPlaying()==true);
	oggPlayer2.Close();
	}


Doesn't even play the second file.

Though, and this is the important part, even if it did work I'm not sure it would help. The problem is not the code for playing it's the code that tells it when it stopped.
oggPlayerX.StoppedPlaying (change of name so it's easier to understand, it is true when music is stopped) returns the value true TOO early.
At least from what I can hear.
Using my old code sound 2 seems to play before sound 1 has actually finished yet obviously sound 2 only plays once the boolean StoppedPlaying returns true.

So in essence:
Sound 1 plays
StoppedPlaying returns true
Sound 2 plays
Sound 1 audibly stops a second after sound 2 starts
GeneralRe: Sound programming issue. Pin
David Crow6-Nov-09 3:19
David Crow6-Nov-09 3:19 
GeneralRe: Sound programming issue. [modified] Pin
GLGunblade6-Nov-09 7:24
GLGunblade6-Nov-09 7:24 
QuestionRe: Sound programming issue. Pin
David Crow6-Nov-09 16:26
David Crow6-Nov-09 16:26 
AnswerRe: Sound programming issue. Pin
GLGunblade7-Nov-09 16:38
GLGunblade7-Nov-09 16:38 
QuestionInjecting code in all explorer processes Pin
Ivo Beltchev5-Nov-09 6:01
Ivo Beltchev5-Nov-09 6:01 
AnswerRe: Injecting code in all explorer processes Pin
«_Superman_»5-Nov-09 7:11
professional«_Superman_»5-Nov-09 7:11 
GeneralRe: Injecting code in all explorer processes Pin
Ivo Beltchev5-Nov-09 7:45
Ivo Beltchev5-Nov-09 7:45 
Questiongraphics design in c,c++ Pin
aviparida5-Nov-09 5:38
aviparida5-Nov-09 5:38 
AnswerRe: graphics design in c,c++ Pin
Richard MacCutchan5-Nov-09 5:43
mveRichard MacCutchan5-Nov-09 5:43 
QuestionMainframe Vista shadow Pin
baerten5-Nov-09 4:53
baerten5-Nov-09 4:53 
AnswerRe: Mainframe Vista shadow Pin
Richard MacCutchan5-Nov-09 5:56
mveRichard MacCutchan5-Nov-09 5:56 
GeneralRe: Mainframe Vista shadow Pin
baerten5-Nov-09 22:02
baerten5-Nov-09 22:02 
Question[VC++ 6.0] Dialog Control (Not MFC) Pin
PimpDawg5-Nov-09 3:39
PimpDawg5-Nov-09 3:39 
AnswerRe: [VC++ 6.0] Dialog Control (Not MFC) Pin
David Crow5-Nov-09 4:55
David Crow5-Nov-09 4:55 
AnswerRe: [VC++ 6.0] Dialog Control (Not MFC) Pin
«_Superman_»5-Nov-09 5:40
professional«_Superman_»5-Nov-09 5:40 
AnswerRe: [VC++ 6.0] Dialog Control (Not MFC) Pin
Saurabh.Garg5-Nov-09 14:56
Saurabh.Garg5-Nov-09 14:56 
QuestionGetting the dekstop window handle Pin
SujayG5-Nov-09 3:04
SujayG5-Nov-09 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.