How to record utterance in PocketPC without using OpenNetCF?
How to record utterance in PocketPC without using OpenNetCF?
|
|
Hi all,
I am writing an application on PocketPC to record utterance and save it as wav file, but the relative methods in OpenNetCF (in class Multimedia.Audio) don't gurantee the thread safety, which makes my application die all the time, so does anyone know any other libaries that provides thread safety
| |
How to record utterance in PocketPC without using OpenNetCF?
Jesse Auerbach
Instance members are usually not thread safe (including framework’s classes), so you should use synchronization in your code to achieve thread safety instead of looking for thread safe classes.
For example, foo() is not thread safe, so you can do something like this:
Object lockObject = new Object();
...
lock (lockObject) {
foo();
}
There are many other synchronization classes in System.Threading namespace for you to use.