COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Win32 PlaySound() function

• Email
• Follow

Subject: Win32 PlaySound() function

Using: VC++ 2008 Express, Win32, Windows XP.

Once a sound has been initiated asynchronously via the
PlaySound() function, is there a way to get information
on the status of the sound?

For example, is there a way to know if the sound has
finished playing? Is there a way to know if the sound
is still playing?

Is there a way to get the playback cursor (the current
position within the playing waveform)?

TIA.


 0

See related articles to this posting

On Sat, 22 Jan 2011 07:56:11 -0500, "C.M. Burns"
<me@privacy.net> wrote:

>Subject: Win32 PlaySound() function
>
>Using: VC++ 2008 Express, Win32, Windows XP.
>
>Once a sound has been initiated asynchronously via the
>PlaySound() function, is there a way to get information
>on the status of the sound?
>
>For example, is there a way to know if the sound has
>finished playing? Is there a way to know if the sound
>is still playing?
>
>Is there a way to get the playback cursor (the current
>position within the playing waveform)?
>

I don't know about PlaySound, but all those things can be
done with the low-level waveOutXXX functions, such as
waveOUtGetPosition.  I assume PlaySound is just a wrapper
for those same functions, so it seems at least plausible

But it might be easier to just rewrite to use the waveOut
functions completely.

Best regards.

Bob Masta

DAQARTA  v6.00
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Sound Level Meter
Frequency Counter, FREE Signal Generator
Pitch Track, Pitch-to-MIDI

 0

1 Replies
569 Views

Similar Articles

12/7/2013 1:18:32 AM
page loaded in 68115 ms. (0)

Similar Artilces:

function(){}();
What's wrong with this function? On Dec 7, 11:44 am, ballpointpenthief <ballpointpenth...@yahoo.co.uk> wrote: > What's wrong with this function? The total absence of any source code. Henry a �crit : > On Dec 7, 11:44 am, ballpointpenthief <ballpointpenth...@yahoo.co.uk> > wrote: >> What's wrong with this function? > > The total absence of any source code. Is this supposed to be wrong ? On Dec 7, 12:25 pm, Bruno Desthuilliers wrote: > Henry a =E9crit : >> On Dec 7, 11:44 am, ballpointpenthief <ballpointpenth...@yahoo.co.uk> >> wrote: >>> What's wrong with this function? > >> The total absence of any source code. > > Is this supposed to be wrong ? Where a function is concerned the only thing that is right about not having any source code is that the absence of code avoids syntax errors. Henry a �crit : > On Dec 7, 12:25 pm, Bruno Desthuilliers wrote: >> Henry a �crit : >>> On Dec 7, 11:44 am, ballpointpenthief <ballpointpenth...@yahoo.co.uk> >>> wrote: >>>> What's wrong with this function? >>> The total absence of any source

Function definition into main() function.
Hello, Is the code below obey the ISO/IEC 9899:1999? Thanks in advance, Vinicius. #include <stdio.h> #include <stdlib.h> int main(void) { int a = 10; void print() { printf("a = %d\n\n", a); } print(); return 0; } CViniciusM <cviniciusm@uol.com.br> scribbled the following: > Hello, > Is the code below obey the ISO/IEC 9899:1999? No. > #include <stdio.h> > #include <stdlib.h> > int main(void) > { > int a = 10; > > void print() > { > printf("a = %d\n\n", a); > } > > print(); > return 0; > } -- /-- Joona Palaste (palaste@cc.helsinki.fi) ------------- Finland --------\ \-- http://www.helsinki.fi/~palaste --------------------- rules! --------/ "My absolute aspect is probably..." - Mato Valtonen CViniciusM wrote: > Hello, > > Is the code below obey the ISO/IEC 9899:1999? > > Thanks in advance, Vinicius. No, it isn't ISO C. ISO C does not support the sort of "function defined within the body of a function" that you have coded below. > #include <stdio.h> >

Hi, is it possible to write two functions which both require a function as an argument and both being able to use the other function as an argument? Afaik the address of a function is not known upon declaration but only once its defined. Thanks In article <478507ba$0$27196$9b4e6d93@newsspool1.arcor-online.net>, Syren Baran <syren@gmx.de> wrote: >is it possible to write two functions which both require a function as >an argument and both being able to use the other function as an >argument? Yes. >Afaik the address of a function is not known upon declaration >but only once its defined. The address of a function is not known until link time, or possibly not until run time. But that doesn't really matter, because you asked about being able to use the other function as an argument, which is something that happens at run time, not at compile time. You did not ask that each has static calls to each other. For example, int fun1(int (*auxfun)()) { return (auxfun == NULL) ? 5 : 17 * auxfun(NULL); } int fun2(int (*auxfun)()) { return (auxfun == NULL) ? 42 : 9 - auxfun(NULL); } int fun3(void) { return fun1(fun2) + fun2(fun1); } -- " Function returning function handle / indicator function Hi all, I hope you can give me some ideas or help me to figure this out. First question: Is there a built-in indicator function in Matlab? (i.e. a function specified by a set X \subseteq R returning 1 for x \in X and 0 otherwise) If there ist, what's its name? In that case, my second question is obsolete. Second question: If there is no built-in indicator function: I have to construct such an indicator function for different intervals. Therefore what I need is a function which takes an interval [a,b] as input and returns a function handle of the indicator function specified by [a,b]. Right now I am a bit lost in constructing such a function returning a function handle. Can you help me out? Thanks in advance! "Martina " <sir.henry2@gmx.net> wrote in message news:j3ocra$iv3$1@newscl01ah.mathworks.com... > Hi all, > > I hope you can give me some ideas or help me to figure this out. > > First question: > Is there a built-in indicator function in Matlab? (i.e. a function > specified by a set X \subseteq R returning 1 for x \in X and 0 otherwise) If you have discrete sets you're looking for ISMEMBER. But your follow-up question filter() function Hi All, I was reading the technical note on vectorisation and came across the filter() function. Unfortunately I don't come from any kind of signal processing background, although from what I can make out this could be a useful function for my work. I couldn't understand the help file. If I have row vector x defined, what will filter([a b],[c d], x) do, in terms of a,b,c,d and x(i)? Any help will be very much appreciated Rob "Rob McIntyre" <mcintyrer@andisa.co.za> wrote in message news:eee45e9.-1@webx.raydaftYaTP... > Hi All, > I was reading the technical note on vectorisation and came across the > filter() function. Unfortunately I don't come from any kind of signal > processing background, although from what I can make out this could > be a useful function for my work. I couldn't understand the help > file. > > If I have row vector x defined, what will > > filter([a b],[c d], x) > > do, in terms of a,b,c,d and x(i)? > > Any help will be very much appreciated > Rob What don't you understand from help filter? Apologies I misread the help file, in truth. I see the light now. Thanks function signature Hi, Is there a way to add signatures to user written function and procedures? So that validation of method calls are made at compile time vs. run time? example: pro foo, bar ... end some calls in his code: pro calling_foo foo ;without the bar parameter end So, is there a way when calling_foo is compile that it will catch this error at compile time as a syntax error? gracias, dometz Dominic wrote: > Hi, > > Is there a way to add signatures to user written function and > procedures? So that validation of method calls are made at compile time > vs. run time? >... the "bar" parameter mandatory at compile time? thanks, dometz mgalloy@gmail.com wrote: > Dominic wrote: > > Hi, > > > > Is there a way to add signatures to user written function and > > procedures? So that validation of method calls are made at compile time > > vs. run time? > > > > example: > > > > pro foo, bar > > ... > > end > > > > some calls in his code: > > pro calling_foo > > foo ;without the bar parameter > > end > > > > So, is there a way when calling_foo function as parameter? Hi, I was wondering if it is possible to pass on a function as parameter. Because I have a class that extends a thread and uses a socket, and listens constantly to this socket. Now when something passes over the connection, the output needs to be displayed in a JTextArea. So what I would like to do is: public void displayOutput(String msg) { outputBox.append(msg); } and when initializing the thread: server = new Server(this.displayOutput()); only I have no idea what I would have to in the constructor of the Serverclass nor how to call the function from within the server class. I know it's possible in C++, but about Java I'm not sure. Thanx if anyone knows the answer to this. greetings Tim > Hi, > > I was wondering if it is possible to pass on a function as parameter. > Because I have a class that extends a thread and uses a socket, and > listens constantly to this socket. Now when something passes over the > connection, the output needs to be displayed in a JTextArea. So what I > would like to do is: > > public void displayOutput(String msg) > { > outputBox.append(msg); > } > > and when initializing the thread Function File() Hello I'm using the function File() to check if a file is on a network directory available. Something like this: if File("S:\Directory\Style.XLS") resume := .t. else Alert("File not....") end I also tried with IsDirectory(), but it's the same. Work well, but it take about 10-30s to get the answer it the network drive S: is not OK! Thanks in advance for any help. Otto Dear Otto Haldi: On Jan 7, 3:19=A0am, Otto Haldi <oha...@chateau.ch> wrote: > Hello > > I'm using the function File() to check if a file is on a network > directory...:\Directory" a trusted location with your anti-virus. David A. Smith On Jan 7, 5:19=A0am, Otto Haldi <oha...@chateau.ch> wrote: > Hello > > I'm using the function File() to check if a file is on a network director= y available. > Something like this: > if File("S:\Directory\Style.XLS") > =A0 =A0resume :=3D .t. > else > =A0 =A0Alert("File not....") > end > I also tried with IsDirectory(), but it's the same. > Work well, but it take about 10-30s to get the answer it the network driv= e S: is not OK! > > Thanks mod function 1. Can anybody help me : How can I use mod function in Java? Thanks Zee On Sat, 8 Nov 2003 20:27:16 -0800, "Zee" <cme@iamhere.ca> wrote or quoted : >1. Can anybody help me : How can I use mod function in Java? http://mindprod.com/jgloss/modulus.html -- Canadian Mind Products, Roedy Green. Coaching, problem solving, economical contract programming. See http://mindprod.com/jgloss/jgloss.html for The Java Glossary. a=10%3; for example "Zee" <cme@iamhere.ca> wrote in message news:SMgrb.30065$mB5.1434524@news20.bellglobal.com... > 1. Can anybody help me : How can I use mod function in Java? > > > Thanks > > Zee > >
I wanted to know if given a list which has three elements, that are the coefficients of a polynomial, would it be possible to turn that into a function? I tried this: function z=polinomio(a,b,c) z=@(x)a*x^2+b*x+c; end But when I put polinomio(1,2,3), for example, it returns z=@(x)a*x^2+b*x+c. Thanks! "Isabel" <isabels29@hotmail.com> wrote in message <gg4qd1$rbc$1@fred.mathworks.com>... > I wanted to know if given a list which has three elements, that are the coefficients of a polynomial, would it be possible to turn that into a function? > I tried this: > function z=polinomio(a,b,c) > z=@(x)a*x^2+b*x+c; > end > > But when I put polinomio(1,2,3), for example, it returns z=@(x)a*x^2+b*x+c. > Thanks! I don't see what the problem is. Using your function: z = polinomio(1,2,3) >> z(5) % Evaluate the polynomial for x = 5 ans = 38 Isn't that what you wanted? "Matt Fig" <spamanon@yahoo.com> wrote in message <gg4tml$m8t$1@fred.mathworks.com>... > "Isabel" <isabels29@hotmail.com> wrote in message <gg4qd1$rbc$1@fred.mathworks.com>... > > I wanted to know if given