473,386 Members | 1,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Playing Audio from a Filestream using MCI

Hi,

Is there a way to play audio using MCI (I preffer MCI, but if you know of any others I'll be greatful) from a Filestream?

I mean, I have a filestream to an audio file, can I play the audio? I can't access the file directly, so just using the MCI's MCI_OPEN command won't work.

--------------------------------
From: Gidi Morris

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>C4UaTwi8kEejMGrF3EJ5KQ==</Id>
Nov 20 '05 #1
2 2075
* Gidi Morris via .NET 247 <an*******@dotnet247.com> scripsit:
Is there a way to play audio using MCI (I preffer MCI, but if you know
of any others I'll be greatful) from a Filestream?

I mean, I have a filestream to an audio file, can I play the audio? I
can't access the file directly, so just using the MCI's MCI_OPEN command
won't work.


This code should work after doing some changes (reading the byte array
from the filestream instead of loading it from a resource):

<URL:http://www.google.de/groups?selm=c71i55%24gvvlh%241%40ID-208219.news.uni-berlin.de>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
hi***************@gmx.at (Herfried K. Wagner [MVP]) wrote in message news:<2j*************@uni-berlin.de>...
* Gidi Morris via .NET 247 <an*******@dotnet247.com> scripsit:
Is there a way to play audio using MCI (I preffer MCI, but if you know
of any others I'll be greatful) from a Filestream?

I mean, I have a filestream to an audio file, can I play the audio? I
can't access the file directly, so just using the MCI's MCI_OPEN command
won't work.


This code should work after doing some changes (reading the byte array
from the filestream instead of loading it from a resource):

<URL:http://www.google.de/groups?selm=c71i55%24gvvlh%241%40ID-208219.news.uni-berlin.de>


This might be just what you're looking for. A DotNet class wrapper for MCI.

http://www.mentalis.org/soft/class.qpx?id=1

--Wayde
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
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...
7
by: Lee Moody | last post by:
I just want quick and easy way to play a .wav file out the standard sound device. It could even be as simple as activating a sound assigned to an existing windows sound event. Any suggestions?...
1
by: Terry Olsen | last post by:
Using the following routine to play embedded wav files: Private Sub PlaySound(ByVal Sound As Int32) Select Case Sound Case 1 : My.Computer.Audio.Play(My.Resources.Sounds.GoOnline,...
5
by: drabee | last post by:
Please help 2 things: 1-I need c# code to compare 2 audio files .or any other .net code 2-code to receive bluetooth file from mobile and save it using .net code
4
by: fAnSKyer/C# newbie | last post by:
I am using winmm.dll and I found that I can't just suspend it and resume it? What should I do? Any better idea? Should I use thread? and thread.suspend will work? Thanks
0
by: kumaragurur | last post by:
Hi all, How to save the content of the audio file posted from vxml application using .net. I done the same in php but i couldnt do in asp.net. if(Request != null) { StreamReader sr =...
0
by: Sobin Thomas | last post by:
Hi,All... I found in one of the articles on the net that an audio file can be played in asp.net by setting the Hyperlink's Navigate Url as the audio file name. ie,...
0
by: Sobin Thomas | last post by:
Hi,All... I found in one of the articles on the net that an audio file can be played in asp.net by setting the Hyperlink's Navigate Url as the audio file name. ie,...
1
by: Sobin Thomas | last post by:
Hi,All... I found in one of the articles on the net that an audio file can be played in asp.net by setting the Hyperlink's Navigate Url as the audio file name. ie,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
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,...
0
jinu1996
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.