wma

Playing part of a sound (WMA) file in C#

时光毁灭记忆、已成空白 提交于 2020-01-05 06:36:16
问题 I have a single WMA file which contains lots of different pieces of audio. Is there any way I can play part of a sound stream? Something like: public static void Play(Stream soundStream, long start, long end); 回答1: You may be able to do this using NAudio, it is a audio library for .Net. Using the example here I was able to throw a quick test application up to try it. Using the WaveSteam.Skip(int seconds) method you are able to start at a specific position in the file. I have not been able to

Playing part of a sound (WMA) file in C#

梦想的初衷 提交于 2020-01-05 06:34:02
问题 I have a single WMA file which contains lots of different pieces of audio. Is there any way I can play part of a sound stream? Something like: public static void Play(Stream soundStream, long start, long end); 回答1: You may be able to do this using NAudio, it is a audio library for .Net. Using the example here I was able to throw a quick test application up to try it. Using the WaveSteam.Skip(int seconds) method you are able to start at a specific position in the file. I have not been able to

Possible to get the length of a WMA file without using Windows Media Player?

£可爱£侵袭症+ 提交于 2019-12-24 10:54:07
问题 I need to find a way to get the length of a WMA file without using any of the Windows Media Player(WMP) dlls. I found way to do it using WMP dlls, which you can see here, but due to another issue, I'd rather find a way where I don't have to use WMP. One promising method that use NAudio and works with MP3s can be seen below: double GetMediaDuration(string MediaFilename) { double duration = 0.0; using (FileStream fs = File.OpenRead(MediaFilename)) { Mp3Frame frame = Mp3Frame.LoadFromStream(fs);

Receive text message using J2ME

感情迁移 提交于 2019-12-23 12:43:03
问题 I am trying to make a J2ME application to SEND and RECEIVE text messages. I'm done with the sending part of it but I am not able to receive any message.. Below is what I tried in order to receive text message; try { MessageConnection conn = (MessageConnection) Connector.open("sms://:50001"); conn.setMessageListener(new MessageListener() { public void notifyIncomingMessage(MessageConnection conn) { try { Message msg; msg = conn.receive(); if (msg instanceof TextMessage) { TextMessage tmsg =

Compress wav file to wma on Windows Phone 8

天涯浪子 提交于 2019-12-20 05:38:12
问题 I am looking to encode a wav file in wma (or mp3, ogg, etc) on Windows Phone. I have not found any resources online. Any ideas on how I can archive this? I am trying to record a voice from the microphone and upload it from the phone. That's why I prefer to compress the audio file before sending it. 回答1: Starting from Windows Phone 8.1, you can use MediaTranscoder class for that. Also, since WP 8.0 you can use AudioVideoCaptureDevice to record directly into the compressed format. Unfortunately

Is it possible to decode an MMS+WMA2 stream using audio units on the iPhone?

拜拜、爱过 提交于 2019-12-13 16:04:09
问题 I am not sure whether audio units can work as codecs in a streaming audio scenario on the iPhone. I've read in various places that it can be done, but I haven't seen any examples or proper documentation for that. Instead, I find that most of the apps released have utilised ffmpeg and libmms. I appreciate any help you can give me. 回答1: Audio Units are very low-level and are useful if you want to do some heavy audio processing like realtime audio effects. As far as I know Audio Units doesn't

How to convert from wma to mp3 using NAudio

感情迁移 提交于 2019-12-12 03:35:05
问题 Please note This is NOT a duplicate of the other question linked. That uses classes I couldn't find, as detailed in my question below. I'm trying to convert wma files to mp3. I need a solution that I can integrate into my code base, not rely on an external resource, so using ffmpeg isn't an option. I've been trying NAudio, but without any success. One problem is that there seem to be two versions of NAudio around, and neither seems complete. The one you get from Nuget doesn't include the

SMS goes to the inbox when the mobile is disconnected

只愿长相守 提交于 2019-12-11 17:17:52
问题 I'm using J2ME WMA to send/receive SMS into a specific port, wich in my case is port 50000. When one of the mobile devices is not running the application the message goes to the inbox, which by default is port 0. Is there any way to prevent this from happening? 回答1: PushRegistry resolves the issue but it's only available in WMA 2.0. Check the WMADemo sample at JavaME SDK 3.0. 来源: https://stackoverflow.com/questions/4932972/sms-goes-to-the-inbox-when-the-mobile-is-disconnected

WMA support in Java

冷暖自知 提交于 2019-12-11 12:57:07
问题 Actually, we need to convert a WMA audio file into FLAC. But there's a lack of ways to convert WMA into more convenient formats. Can you recommend us a library, that can help us, or something like that? 回答1: What you need is JAVE: The JAVE (Java Audio Video Encoder) library is Java wrapper on the ffmpeg project. Developers can take take advantage of JAVE to transcode audio and video files from a format to another. In example you can transcode an AVI file to a MPEG one, you can change a DivX

Receive sms on specific port j2me

ぐ巨炮叔叔 提交于 2019-12-08 02:51:33
问题 I am developing j2me app. I need to receive sms on specific port. Which is the best port to define for receiving sms? Thanks for advice 回答1: The SMS spec (JSR 120) says you can't have a port that another app is using at that time, and also you can't have any of the ports that are specified in the following table. For security reasons, Java applications are not allowed to send SMS messages to the port numbers listed in Table A-4. Implementations MUST throw a SecurityException in the