Solved

Audio

Posted on 2004-08-03
10
433 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Also luck at this project:
http://nbass.sourceforge.net/
0
 

Author Comment

by:gvector1
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
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
Comment Utility
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
Comment Utility
Your method is straight and simple, if works, then use it.
0
 

Author Comment

by:gvector1
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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.

772 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

12 Experts available now in Live!

Get 1:1 Help Now