|
The object of my program is to play tones through the speakers. I've seen programs that can generate .wav files and then play those, but I need to be able to raise/lower the pitch of the tone while it plays. Something like the Beep() function, but able to play through the speakers, rather than the pc's built in speaker. Note also that I plan to play two different tones through the left and right speakers, so I'll need some way of controlling this as well.
|
|
|
|
|
|
Yes, and unless you see something I'm not, that talks about writing a wav file and then playing it, which isn't what I wanted
|
|
|
|
|
It can create it in memory, not save it to disk.
But apparently it still has to finish writing it before it can play.
A couple of weeks ago I was looking for a way to play a tone for as long as the user presses a key, but no joy.
|
|
|
|
|
This probably won't help, but when i was doing some stuff on Linux a while ago I played some raw audio files, you did it by sending the data directly to the hardware (through drivers or whatever), so you would be able to construct a sample and send it to be played each frame (rather than getting the data from the file). So, basically what i'm saying is, you might need to get down and dirty because i don't think the .Net framework is going to help you much with this.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
That's what I was afraid of. I suppose I'll take a look into it.
|
|
|
|
|
And if you can get it to work, write an article.
|
|
|
|
|
Hi,
I am currently developing a toolstrip extension which will provide a feature to switch between several different icon sizes. I cannot assume that a provided Icon object will contain the required size, and so in such circumstances the next available size down must be enlarged at runtime. My only issue is in determining whether or not the Icon object contains the requested size.
The following pseudo-code demonstrates what I am trying to achieve:
public bool IconContainsSize(Icon icon, Size size)
{
foreach (subicon in icon)
if (subicon.Size == size)
return true;
return false;
} Once I have finished my extension I plan to upload an article here at CodeProject so that others can benefit from having a toolstrip which provides a facility to switch between the multiple button sizes provided within the programmer specified icon resources.
This is literally the only part of my solution that I am struggling with! I am sure that there must be a .NET approach to this.
Thanks,
Lea Hayes
|
|
|
|
|
Hi
I need to extract files embedded in an RTF file. when I load the file in a rich textbox, it shows the embedded files and opens with thier respective applications. But I cannot access/extract them programatically. Please help.
Thank you.
RYB
|
|
|
|
|
.NET doesn't include support for processing RTF files. You either need to search for a 3rd party library, or do it manually by reading the spec[^]
Simon
|
|
|
|
|
hi
after loading data into my dataTable object, i add new Identity Column to my dataTable for display Row Number, by this method :
private void InitIdentityColumn()
{
if (this.dt.Columns.Contains("rowID"))
{
this.dt.Columns.Remove("rowID");
}
DataColumn dc = new DataColumn("rowID");
this.dt.Columns.Add(dc);
int i = 0;
foreach (DataRow row in this.dt.Rows)
{
i += 1;
row["rowID"] = i;
}
}
but when i want to add row by this code :
FrmCategory frm = new FrmCategory(false, false);
DsStack.CategoriesRow newRow = this.dt.NewCategoriesRow();
Session.SaveInSession("newCategory", newRow);
if (frm.ShowDialog() == DialogResult.OK)
{
newRow = Session.LoadFromSession("newCategory") as DsStack.CategoriesRow;
this.dt.Rows.Add(newRow);
this.adapter.Update(this.dt);
}
the following error has shown me :
Concurrency violation: the UpdateCommand affected 0 of the expected 1 records
but when i don't use InitIdentityColumn method, it was works good, my problem is that how to use InitIdentityColumn and prevent to occure this error, or how to create Identity Column by another way ? (without Row_Number() in sql server)
thanks.
|
|
|
|
|
Can I get some information on connecting to a AS400 database, a sample code snippet would also do.
Thanks
|
|
|
|
|
If it has an ODBC data source, just use the standard ADO.NET classes. If it doesn't, you may not be able to.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks man.............I got the connection..........!!!
Thanks
|
|
|
|
|
Is there a way to display the current contents of a panel on a second panel? My hope is to have an image displaying on a small size panel and when clicked, it will also be displayed on a much larger panel.
|
|
|
|
|
You probably need to write this in a way where you handle both panels, not in a way where it happen automatically. Having said that, a control has a method that draws the control to a bitmap, so it's possible to do what you want, I think
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Got it, this.PanelName.DrawToBitmap.
Thanks!
|
|
|
|
|
Yeah, it came to me while I was typing
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all!
I'm becoming crazy for this problem...then I must rename a file on a FTP, I've tried with the .NET framework integrated classes but I didn't resolve the problem.
Can you help me?...THX
Bye
|
|
|
|
|
You don't really rename files, you Move them with a different name, like:
File.Move("\\myfile.txt", "\\myNewFile.txt");
Does that help you out?
Not sure exactly what you'd do with FTP, but it should be the same kinda thing.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
|
THX, but i've already tried this solution...else?? THX
Bye
|
|
|
|
|
Can you please provide me a code snippet or link where I can find out how to retrive values from datbase into combo box ?
Thanks
|
|
|
|
|
You get the values from the database, then make the data set you get back the data source for the combo box.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks Christian but I tried doing what you said let me just copy paste my code
DataSet ComboboxLicencegrpID;
ComboboxLicencegrpID = CombolicencegrpID();
this.LicensegrpIDBox.DataSource = ComboboxLicencegrpID.Tables["comboLicenseGroupID"];
public DataSet CombolicencegrpID()
{
SqlCommand cmd = new SqlCommand();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "select Name,LicenseGroupID from webqa_state.dbo.METADATA_LicenseGroups";
cmd.Connection = DBConnection.getConnection();
da.SelectCommand = cmd;
da.Fill(ds, "comboLicenseGroupID");
return ds;
}
Its giving me an outputlike this :-
In the Combobox all values are the same and its "System.Data.DataRowView"
What can be the problem ???
|
|
|
|