I am used to embed WAV into .exe and Play it using PlaySound(). However, using this method causes the .exe to become pretty big.
Is it possible to do the same with MP3 files and how to do it?
I have taken a look at DirectShow but it seems to be able to play from files only?
I am developing for Windows Mobile 6 Series
You can try to save the mp3 as mp3 with RIFF-WAV header and embed the file in resources. I did not check windows-mobile and a file stored in resources but on Windows XP and separate file the PlaySound of such RIFF-WAV MP3 file works.
Related
In terms of animation, I actually mean things like the file transfer avi used in Windows dialog boxes:
I'm trying to find out first if there is a way to access these files, if not how to use them inside windows forms. I know about SysAnimate32 and how it works to provide animations in windows forms.
How as users can we access or extract these from Windows?
You can use ResourcesExtract tool to extract resources from Windows executables or library files.
It can extract:
icons
bitmaps
animated icons
AVI files
cursors
other kinds of resources
and supports following file formats:
*.dll
*.ocx
*.exe
The test
Because of your comment, stating that it doesn't work, I've downloaded the 64-bit version of the tool (because I'm using 64-bit version of Windows 7) and tested it on .exe and .dll files, which I've found in C:\Windows\System32 folder.
I've run the tool with normal permissions, e.g. not using Run as Administrator
As source I chose every .exe file beginning with letter P
As destination I chose a new, empty folder
Picked icons, animated icons and avi files to extract
As a result I've successfully extracted 29 icons
Because you said it didn't work on .dll files, I've decided to check them as well, using same method as in (1.)
As you can see it also successfuly extracted files, including animated .avi file
Here's mentioned .avi animation - it happens to be the bar for loading action:
As you can see it actually works, maybe you've simply downloaded wrong version?
I'm making an application that downloads video files from the internet.
The application needs to launch the system's default video player to play these files while they are being downloaded.
I'm not interested in implementing a video (or network) stream to make this work. The videos are being downloaded in sequential order. I need to simulate the process of a user clicking on the video file from file explorer while it is downloading (which always works provided that enough bytes are saved).
To achieve this I spawn a child process that runs
start filepath/filename.avi
but it fails saying the file is in use by another process.
This command also fails if I type it in the cmd while the file is downloading.
However, if I double click the file it will start to play normally in the system's default video player.
What command can I use to make the file open in the system's default video player while it is being downloaded (used by another process)?
Thanks.
Note: files may be of any type, not only .avi like in the example
In my android application i want to record an audio file and send to service (ASP service) with smallest size of file.
And I found that .AMR file is one of orginal record files on Android and it has smallest file.
How can I convert .AMR to .WAV on C#.
Is there a way to scan all file names in specyfic game content folder in XNA on Windows Phone?
As far as I know Windows Phone supports only IsolatedStorage and game content is not stored there.
EOG
The content files are stored in the XAP. Obviously you can access the files in the XAP, but you can't iterate through it. However, since the XAP can't be modified from your app, you should already know all the files that are in there. Is there a reason you want to scan it? If you want to scan it for design-time purposes, then the answer from this post might help.
I have a mediaplayer that can only read samba shared files. I would like to play http stream (from my dreambox for instance).
My idea is to share a folder on my linux. In this share, I will put a (fake?) file for each tv channel I want to be able to watch (ex : channel1.ts, channel2.ts ...).
The mediaplayer can only read these file as it should with regular files. My need : do something that "listen" for access on these files so that when my mediaplayer access it, it fires a mencoder -oac copy -ovc copy -o channel1.ts http://path.to.the.broadcast.ts.
I tried using inotify on an empty file. It fires the mencoder well BUT the mediaplayer stops before encoding starts (because the file is empty so it reaches the end before it starts). Perhaps, have to fill 5s of video in order to buffer the read ?
Could be nice to use a "fifo" => I tried it, the mediaplayer waits, when I do the mencoder, the fifo starts growing, the mediaplayer plays it ! Yeahh !!!... BUT inotify seems not to react on a fifo... so I can't fire mencoder automatically.
Every suggestions welcome.
Basic points :
The media player can ONLY reads regular files
File must be in a samba shared folder
Record must be "fired" on demand (when mediaplater try to access it)
Could be nice to watch for "inactivity" in order to stop recording / emptying buffer file
It is not easy to formalise this question. I am a bit disapointed and I even't don't know what kind of search I could googelise for that.
Hope some gurus here will find something to do the trick
Cheers.
You might want to look at the techniques Hierarchical Storage Management and on-access Virus Scanners use, as they need to do similar interruption before the normal access.
e.g. Use Talpa to intercept open operations in the selected directory, and replace the file at that point.