?
Solved

Audio

Posted on 2004-08-03
10
Medium Priority
?
440 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 11707555
Look at the WmaStream class explanation and sourcecode in this article:

http://www.codeproject.com/cs/media/ManWMF.asp
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
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 this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
Suggested Courses

777 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