Using XP and VB 2005, it seemed like a good idea to
save audio in the clipboard and then play it with backgroundworker.
Cannot find a good Clipboard audio example anywhere - just SetAudio
and GetAudio. And an example seems to do a SwapAudio which makes no
sense.
Basically I want to spool or simulate spooling of audio.
So is this reasonable for asynchronous audio clip play? or alternate?
Any thoughts or pointers to other sources? Thanks. 3 3426
On Sep 27, 5:31*am, AWW <wrote:
Using XP and VB 2005, it seemed like a good idea to
save audio in the clipboard and then play it with backgroundworker.
Cannot find a good Clipboard audio example anywhere - just SetAudio
and GetAudio. And an example seems to do a SwapAudio which makes no
sense.
Basically I want to spool or simulate spooling of audio.
So is this reasonable for asynchronous audio clip play? or alternate?
Any thoughts or pointers to other sources? Thanks.
AWW,
You can take a look at Clipboard's overloaded SetAudio and
GetAudioStream methods as follows: http://msdn.microsoft.com/en-us/libr...io(VS.80).aspx http://msdn.microsoft.com/en-us/libr...am(VS.80).aspx
However, if you just want to play a WAV file at the background, you
can use "My.Computer.Audio.Play" as follows:
'Play wav file in background continuously
'Check AudioPlayMode Enum for more options
My.Computer.Audio.Play("c:\sound.wav", AudioPlayMode.BackgroundLoop)
'To stop just call Stop method
My.Computer.Audio.Stop
Hope this helps,
Onur Güzel
On Sat, 27 Sep 2008 03:03:24 -0700 (PDT), kimiraikkonen
<ki*************@gmail.comwrote:
>On Sep 27, 5:31*am, AWW <wrote:
>Using XP and VB 2005, it seemed like a good idea to save audio in the clipboard and then play it with backgroundworker. Cannot find a good Clipboard audio example anywhere - just SetAudio and GetAudio. And an example seems to do a SwapAudio which makes no sense. Basically I want to spool or simulate spooling of audio. So is this reasonable for asynchronous audio clip play? or alternate? Any thoughts or pointers to other sources? Thanks.
AWW, You can take a look at Clipboard's overloaded SetAudio and GetAudioStream methods as follows: http://msdn.microsoft.com/en-us/libr...io(VS.80).aspx http://msdn.microsoft.com/en-us/libr...am(VS.80).aspx
However, if you just want to play a WAV file at the background, you can use "My.Computer.Audio.Play" as follows:
'Play wav file in background continuously 'Check AudioPlayMode Enum for more options My.Computer.Audio.Play("c:\sound.wav", AudioPlayMode.BackgroundLoop)
'To stop just call Stop method My.Computer.Audio.Stop
Hope this helps,
Onur Güzel
OK, that is the way it should work but I have SetAudio in the
"foreground" and even checked immediately for ContainsAudio and get a
True response. But in BackgroundWorker_DoWork the ContainsAudio
returns a False.
Any idea about that? Thanks for any thoughts.
On Sep 28, 5:13*am, AWW <wrote:
On Sat, 27 Sep 2008 03:03:24 -0700 (PDT), kimiraikkonen
<kimiraikkone...@gmail.comwrote:
On Sep 27, 5:31*am, AWW <wrote:
Using XP and VB 2005, it seemed like a good idea to
save audio in the clipboard and then play it with backgroundworker.
Cannot find a good Clipboard audio example anywhere - just SetAudio
and GetAudio. And an example seems to do a SwapAudio which makes no
sense.
Basically I want to spool or simulate spooling of audio.
So is this reasonable for asynchronous audio clip play? or alternate?
Any thoughts or pointers to other sources? Thanks.
AWW,
You can take a look at Clipboard's overloaded SetAudio and
GetAudioStream methods as follows: http://msdn.microsoft.com/en-us/libr...forms.clipboar... http://msdn.microsoft.com/en-us/libr...forms.clipboar...
However, if you just want to play a WAV file at the background, you
can use "My.Computer.Audio.Play" as follows:
'Play wav file in background continuously
'Check AudioPlayMode Enum for more options
My.Computer.Audio.Play("c:\sound.wav", AudioPlayMode.BackgroundLoop)
'To stop just call Stop method
My.Computer.Audio.Stop
Hope this helps,
Onur Güzel
OK, that is the way it should work but I have SetAudio in the
"foreground" and even checked immediately for ContainsAudio and get a
True response. But in BackgroundWorker_DoWork the ContainsAudio
returns a False.
Any idea about that? Thanks for any thoughts.
Same behaviour, If i use BackgroundWorker! Playing the stream simply
in a button1_click returns True if the audio is on clipboard. My guess
(just prediction) that, when you try to invoke Background object,
clipboard gets changed or modified and audio data on clipboard is no
longer available to be found. Maybe there are better explanations.
HTH,
Onur Güzel This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: LG |
last post by:
Just have a question with regards to the clipboard, and how to read what
other applications (Adobe InDesignCS) place in the clipboard.
I am currently in the process of creating a booklet from a...
|
by: Bruce Bon |
last post by:
The class below is intended to play a Sun audio file (.au) in the
background while the main thread, which is servicing a GUI, continues
without impact. It doesn't work. For a sound file that...
|
by: Steve K |
last post by:
Hi,
I'm designing a website for the Cornell Undergraduate Business Program
where the client wants faculty and student profiles to be interspersed
throught the site.
These profiles are...
|
by: Isaac Grover |
last post by:
Hi everyone,
I have recorded some conference calls for my business partners, put them online
in Shockwave audio format using a player available from Shockwave. And I'm
encountering an annoying...
|
by: laredotornado |
last post by:
Hello, I want to play an audio file embedded on my page by clicking on
an audio image and the page change to a new page. Is there a
cross-browser Javascript way to do this? Right now the code I...
|
by: laredotornado |
last post by:
Hello, I want to play an audio file by clicking on an audio icon and
not having the page switch out underneath. Right now the code I have
is ...
<html>
<head>
<title>Dictionary:...
|
by: hzgt9b |
last post by:
Using VS2003, VB.NET,
BACKGROUND
I have a window forms based application that will be distributed and
executed directly from CD media. The app contains a TreeView control and a
WebBroswer...
|
by: anil.rita |
last post by:
When the user chooses an AV file to play, based upon the type of file,
I want to use the default installed media player to play it.
I am wondering if this is a good way - any alternatives,...
|
by: =?Utf-8?B?Qm9iQWNoZ2lsbA==?= |
last post by:
I am using Windows Media Player to play my half second audio files one after
the other using the code below...
My problem comes when I play a second audio file immediately after the first
one...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |