Audio Mode in Silverlight

1. I created an audio player in silverlight.

inside this player, the user can select a part of the song to save as a ringtone.

but I have from time to time. but I have to cut out a partial portion of the stream or audio stream and save it on the server.

Plz tell me how can I convert the selected duration of the sound to a stream or an array of bytes.?

- Additional information on this subject: 2. I created a sound player for ringtones in silverlight. Inside this user, you can select the part that can be cut and saved as an audio file.

I can not save the stream to disk. It gives the following errors:

Error 1. An attempt to access the method failed. System IO FileInfo OpenWrite

Help Plz

- Additional information on this: 3. What is the use of the MediaStreamSample and MediaStreamSource classes in Silverlight regarding MediaElement?

Would it help cut off part of the audio file to create a melody from a song?

+3
source share
2 answers

If you need to save to the server, you need to get this data on the server.

A simple save (as indicated) will try to save on the client machine. What you need to do is upload the data to the server either through the WCF service, or using an ASHX handler or such. I did something similar - uploading MP3 files from a Silverlight client to a WCF service via Stream works fine.

: , , , - , , . , mp3?

-, mp3plt, mp3. , , Silverlight, , , , .

mp3-, , , (, ), , ( kb/s * seconds = kb) [], .

+1

1. . System IO FileInfo OpenWrit, . , SaveFileDialog , .

0

Source: https://habr.com/ru/post/1734538/


All Articles