|
I am taking a bunch of wav files and try to combine them by inserting smaller wav files into an original big wav file. (ie. I have a 45 min long wav file and I am trying to insert or merge 30sec long wav into that 45min wav file, outputting a new file where all wav files are merged.) The program uses file selection dialogue box so the user can choose where to save the output file. I tried saving the file in C:\ and no luck.
|
|
|
|
|
So your progam logic goes:
1) open big file
2) read big file into memory
3) close big file
4) Open small file, read , insert into big file data in memory, close small file
5) Open small file, read , insert into big file data in memory, close small file
6) Open output file, write memory to output, close output.
Yes?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I believe it keeps a list of files to read from in memory, and then reads each file and write it to the output file.
|
|
|
|
|
Thanks so much for the replies. I just found out the whole program won't run on my netbook so I'll have to test it out tomorrow, but meanwhile I can provide a bit more details on the code.
The main program creates a WavFile object, which has the following code:
string destinationFile = *some path, due to spacing I left it out;
string originalFile = some path + Path.GetFileNameWithoutExtension(projSettings.SaveFileName) + "_audio.wav";
WavFile wf = new WavFile(originalFile, destinationFile, this);
...
And then the WavFile class has the following constructor:
public WavFile(string videoAudioFile, string desFileName, mainparentMain){
...
outfileName = desFileName;
videoAudioFileName = videoAudioFile;
...
writeAudioFileHeader(outfileName, true);
}
The method writeAudioFileHeader is the code I've posted in my original post.
I stepped through the code to see where outFileStream is declared or used elsewhere but I can't find it used before line 503 writeAudioFileHeader method, it is declared as a private FileStream variable in WavFile class and it's not initialized until line 503. I can't figure out what's using it before it's initialized
But thanks so much for the replies.
|
|
|
|
|
Dear All,
I am using windows 2008, VS 2008, and SQL Server 2008.
I built a windows application which reads data from SQL 2008.
when I install this application into windows 2008 , it runs successfully and read the data successfully.
But when I install this application on windows XP, it runs successfully but it does not read any data in its forms.
I installed Dot Net framework 3.5 SP1 on the windows XP machine, and it did not work.
I searched google with no results.
Please help
Kind Regards
OBarahmeh
modified on Monday, November 2, 2009 3:41 AM
|
|
|
|
|
This may seem like a stupid question, but do you have SQL server installed on the XP machine you are having trouble with?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
It is not a stupid question, because the SQL Server is installed on the server, and the client login with a user name and password which have read access into the database.
Kind Regards
OBarahmeh
|
|
|
|
|
After I sent data to connect TcpClient with TcpListener BeginWrite().
In Async write data handler I need to disconnect client. I do that immediatly after EndWrite() call. But in that case client gets disconnected before it invokes ReadData() method.
How to wait until client will recieve the data?
Strange, that happen only in Release mode. In Debug mode there are no such problems.
Чесноков
modified on Sunday, November 1, 2009 5:53 AM
|
|
|
|
|
I removed client disconnection from the Write async handler in TcpListener and in that case client application hangs in Read() method call???
Чесноков
|
|
|
|
|
Hi, I'm writing a program for keyboard simulation, I need to have a direct hook here. I've googled for few days and found kinda nothing. Want to read about simulating direct key down/up and etc.
I've played here around with autocomplet, cought keyboard and found
http://msdn.microsoft.com/en-us/library/bb321309%28VS.85%29.aspx
public byte[] SendHardwareCommand(int command, byte[] data);
Here is what I have right now. And cannot find any documentation about "SendHardwareCommand" (maybe that's a method I need). Google gives me few links with only structure of this method.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using Microsoft.DirectX;
using Microsoft.DirectX.DirectInput;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Device keyboard;
keyboard = new Device(SystemGuid.Keyboard);
try
{
keyboard.Acquire();
}
catch (DirectXException ex)
{
Console.WriteLine(ex.Message);
}
KeyboardState keyboardState;
try
{
keyboard.Poll();
keyboardState = keyboard.GetCurrentKeyboardState();
}
catch (NotAcquiredException)
{
try
{
keyboard.Acquire();
}
catch (InputException iex)
{
Console.WriteLine(iex.Message);
}
}
catch (InputException ex2)
{
Console.WriteLine(ex2.Message);
}
Console.WriteLine("Wait 2 seconds:");
Thread.Sleep(2000);
byte[] byteArray = new byte[1];
byteArray[0] = (byte)'?';
keyboard.SendHardwareCommand(2, byteArray);
}
}
}
|
|
|
|
|
Hi chainerlt,
I am pretty sure you will not be able to simulate keyboard input with the SendHardwareCommand function. That is function is for sending a command to a Force Feedback Device Driver[^]. If I am not mistaken I believe it is a wrapper for the SendForceFeedbackCommand function[^]. This is typically used with vibrating joysticks and force feedback mice.
Best Wishes,
-David Delaune
|
|
|
|
|
any ideas how to send fake keydown and keyup and such things? using direct hooking in c# ?
|
|
|
|
|
You should investigate using P/Invoke to call the SendInput Function[^].
Best Wishes,
-David Delaune
|
|
|
|
|
As I understand SendInput is not a direct connection to a keyboard. So it wont work for applications which use directInput hook for their control.
|
|
|
|
|
SendInput inserts the keyboard input directly into the kernel input chain. DirectInput will be able to read input generated by SendInput. What type of hook ate you referring to? A Service Descriptor Table hook would be able to block SendInput.
Best Wishes,
-David Delaune
|
|
|
|
|
a simple windowsHook can filter out SendInput
|
|
|
|
|
I need help for this program i dont know how do this program...
|
|
|
|
|
Then you should get a book, read, understand and then try. Or search google. Or pay someone to write code for you. It is not likely that you would get a source code from here.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
try
System.Diagnostics.Process.start("calc");
|
|
|
|
|
Creating calculators is just the most basic one of C# windows programming. I think you need to read the basics first before you go with any code.
Regarding your requirement here is it :
A Calculator using C#[^]
|
|
|
|
|
Now you just know that code is going to turn up in a school paper, hopefully this person is dumb enough not to file off the serial numbers, then again they will probably break the code trying.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: then again they will probably break the code trying.
I guess you are right. Thats why I suggested him to read basic books.. and AFAIK, most of the books has this example in the first chapter...
|
|
|
|
|
I am looking for an SMPP client to use to send SMS on .NET? anyone knows where can I get? otherwise, is it easy to develop it?
|
|
|
|
|
try this. [www.inetlab.ru]
You can create your own also but for this you must have enough time and you must understand the SMPP spcification. Sure this will take lot of time for beginners. GOOD LUCK
Regards
Aftab Sindhi
.NET Application Developer
U.A.E
|
|
|
|
|
Well.. I think i can help you regarding this.... Please let me know the following:
(1) You are using SMPP over TCP/IP.. Is there any chance to integrated HTTP over TCP/IP.
(2) You are sending only 160 Char text message or it may others hex data i.e., wap push, logo, mono ring tone, etc.
(3) Do you need the SMS delivery notification from the SMSC.
(4) Do you use any SMSC gateway APIs to connect the SMSC.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|