Solved

Audio

Posted on 2004-08-03
10
434 Views
Last Modified: 2012-06-27
Someone please help. I have posted a topic in the C# forum and have not gotten a reply yet.  I figured I would post it here to ask for some information on how to do this in any language.  Here is what I am trying to do:

I am currently using Windows Media Encoder 9.0 in C# to encode an audio file into a wma format.  Basically the user runs this program to record input from a microphone into a WMA format.  I can also navigate the file(fast forward and rewind during playback).  What I would like to be able to do is for the user to navigate to a certain position and start recording in that spot of the file without overwriting what was recorded before that spot.  Basically duplicating the actions of a tape recorder.  Can someone please give me some pointers on how to accomplish this.  If no information can be given specifically on this, I could use some information on how to edit a wma file.  More specifically on how to append an audio file.  I need some information on how to do this in C#, but I will accept information on how to do this in any language as that may help me determine how to accomplish this in C#.  This question would be worth 1000 points if someone could find some helpful information for me.  For the time I will award the maximum of 500 for a post to anyone that can help.  

Thanks for any and all attempts,
Kendal
0
Comment
Question by:gvector1
  • 6
  • 4
10 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11706710
There are many audio manipulation articles in C# at codeproject.com.
Some examples that write/modify audio data:
http://www.codeproject.com/cs/media/cswavplayfx.asp
http://www.codeproject.com/cs/media/showwaveform.asp
More articles in C# at:
http://www.codeproject.com/cs/media
0
 

Author Comment

by:gvector1
ID: 11707412
Those are some very interesting links and I may be able to use them in the future, but I need something that will help me determine how to combine or append audio files.  To be more specifically, wma audio files.  Any pointers in that direction?

Thanks again,
Kendal
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 11707555
Look at the WmaStream class explanation and sourcecode in this article:

http://www.codeproject.com/cs/media/ManWMF.asp
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11707579
Also luck at this project:
http://nbass.sourceforge.net/
0
 

Author Comment

by:gvector1
ID: 11719808
Very Very helpful resource.  I am still trying to make use of it right now.  I am having to look into the origional Windows Media Format SDK to determine how to use it and the based on how the Translation is, again determine how to make use of it.  Another thing I would like to know is if I am approaching my problem correctly.  Like I said before, I am currently creating a wma file using windows media encoder.  I need for the user to be able to record over any section of the wma file with a new recording.  Say a file they just recorded is 15 seconds long and they realize they have a mistake in the middle of it.  They rewind to the 7 second mark and record 5 seconds worth of new audio.  The file should still be 15 seconds long, just from seconds 7-12 is new audio.  The only way I have determined to accomplish this so far was to record the origional file.  If they need to record over a certain section of the file, the program would create a new recording, make a second copy of the origional recording, trim the end off of the origional and the beginning off of the second copy, append the new recording to the first half of the file and append the last half of the file to that.  It seems like a lot of work and I hope it was not confusing, but is there another way to accomplish this.  Is it possible to just encode over a certain section of the origional or do I have to trim and append files????????

Thanks again,
Kendal
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11719868
In a compressed encoding scheme it is not so easy because a particular portion of audio is linked to previous data, maybe you can cut at compressed block boundaries but not at any point. To do that you must decode data, manipulate (cut/paste/effects) it and encode it again.
0
 

Author Comment

by:gvector1
ID: 11719945
So would my origional approach be the way to go(Encode 2nd file, copy first, trim ending off first, beginning off second and combine all three)????  How would you approach the problem?  Is the WMFSDK what I should use?

Thanks,
Kendal
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11719973
Your method is straight and simple, if works, then use it.
0
 

Author Comment

by:gvector1
ID: 11720309
Thanks,

You have been extremely helpful and have earned the points.  If you would like the 1000 points I spoke of, let me know and I will post a continuation to this question in which I will award you the remaining 500 points.  You have been the only one that has been able to help me on this topic and I greatly appreciate it.  If I have any more questions in this subject I will post back in this forum.

Thanks again,
Kendal
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11720421
Thank you for the offering but recently we have received a EE newsletter where they are limiting to receive an accumulate points to 500 for a single question. Thanks anyway, see you in the next question.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
gHappy challenge 67 118
bigDiff challenge 17 84
countX 22 82
Message not shown 5 33
Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now