Click here to Skip to main content
15,899,634 members
Home / Discussions / Mobile
   

Mobile

 
AnswerRe: How can read and access Nokia Mobile Phone? Pin
Richard MacCutchan17-May-10 21:51
mveRichard MacCutchan17-May-10 21:51 
QuestionSQL Server n SQL Server CE..... Pin
AmbiguousName13-May-10 8:59
AmbiguousName13-May-10 8:59 
AnswerRe: SQL Server n SQL Server CE..... Pin
PavanPareta17-May-10 20:53
PavanPareta17-May-10 20:53 
QuestionHow can Send SMS by BlackBerrry curve 8520 from the PC? [modified] Pin
Le@rner12-May-10 20:59
Le@rner12-May-10 20:59 
QuestionDevelop 3D app for iPhone / Android / WinMo Pin
Fordfanboi11-May-10 9:59
Fordfanboi11-May-10 9:59 
AnswerRe: Develop 3D app for iPhone / Android / WinMo Pin
Fordfanboi11-May-10 11:06
Fordfanboi11-May-10 11:06 
AnswerRe: Develop 3D app for iPhone / Android / WinMo Pin
Joel Ivory Johnson4-Jun-10 8:30
professionalJoel Ivory Johnson4-Jun-10 8:30 
QuestionGSM 6.10 encoding with WaveForm Audio API (C#) Pin
Vittorio Sozzi11-May-10 6:17
Vittorio Sozzi11-May-10 6:17 
Dear Experts,
I'm trying to make a VOIP PocketPC app in C# using the waveform Audio Interface (http://msdn.microsoft.com/en-us/library/aa446573.aspx[^]).
I am trying to set the WaveIn to record in GSM format (see [^]), but unfortunately waveInOpen exits with BAD_FORMAT.
Here's the P/Invoke call I am using (taken from MS's P/Invoke Samples)
[DllImport("coredll.dll")]
public static extern Wave.MMSYSERR waveInOpen(ref IntPtr phwi, uint uDeviceID, ref Wave.WAVEFORMATEX pwfx, IntPtr dwCallback, uint dwInstance, uint fdwOpen); 


and here's the problematic code:
STRUCTS
[StructLayout(LayoutKind.Sequential)]
public class WAVEFORMATEX
{
   public ushort wFormatTag = 0;
   public ushort nChannels = 0;
   public uint nSamplesPerSec = 0;
   public uint nAvgBytesPerSec = 0;
}

[StructLayout(LayoutKind.Sequential)]
public class GSM610WAVEFORMAT
{
   public WAVEFORMATEX wfx;
   public ushort cbSize;
   public ushort wSamplesPerBlock;
}


and code:
Wave.GSM610WAVEFORMAT m_wfmt_gsm;
curDevice = Wave.WAVE_MAPPER;
m_wfmt_gsm = new Wave.GSM610WAVEFORMAT();
m_wfmt_gsm.wfx = new Wave.WAVEFORMATEX();
m_wfmt_gsm.wfx.wFormatTag = (ushort)0x31;
m_wfmt_gsm.wfx.nChannels = 1;
m_wfmt_gsm.wfx.nSamplesPerSec = 8000;
m_wfmt_gsm.wfx.nAvgBytesPerSec = 1625;
m_wfmt_gsm.nBlockAlign = 65;
m_wfmt_gsm.wBitsPerSample = 0;
m_wfmt_gsm.cbSize = 2;
m_wfmt_gsm.wSamplesPerBlock = 320;
result = WaveIn.waveInOpen(ref m_hwi, curDevice, m_wfmt_gsm.wfx, hwnd, 0, Wave.CALLBACK_WINDOW);


Note that is works just fine with regular PCM audio and regular WAVEFORMATEX.
Can anybody give me a clue, please?
Thanks in advance.
Vittorio Sozzi

QuestionWhere to Start Pin
εїзεїзεїз7-May-10 10:44
εїзεїзεїз7-May-10 10:44 
AnswerRe: Where to Start Pin
PavanPareta12-May-10 2:06
PavanPareta12-May-10 2:06 
GeneralRe: Where to Start Pin
εїзεїзεїз12-May-10 19:24
εїзεїзεїз12-May-10 19:24 
AnswerRe: Where to Start Pin
Joel Ivory Johnson22-May-10 3:43
professionalJoel Ivory Johnson22-May-10 3:43 
QuestionLooking for advice: Symbian vs J2ME Pin
RadPC5-May-10 5:09
RadPC5-May-10 5:09 
AnswerRe: Looking for advice: Symbian vs J2ME Pin
Peter_in_27805-May-10 14:49
professionalPeter_in_27805-May-10 14:49 
QuestionChanging Proxy Settings Programmatically Pin
AmitDey4-May-10 0:55
AmitDey4-May-10 0:55 
AnswerRe: Changing Proxy Settings Programmatically Pin
AmitDey6-May-10 3:54
AmitDey6-May-10 3:54 
QuestionHow can I install an app inside a storage card? [modified] Pin
JUNEYT30-Apr-10 22:14
JUNEYT30-Apr-10 22:14 
AnswerRe: How can I install an app inside a storage card? Pin
Joel Ivory Johnson22-May-10 3:42
professionalJoel Ivory Johnson22-May-10 3:42 
NewsLast chance to participate in mobile developer survey Pin
Matos Kapetanakis30-Apr-10 5:47
Matos Kapetanakis30-Apr-10 5:47 
QuestionError in Windows CE Emulator [Solved] Pin
nagendrathecoder29-Apr-10 19:18
nagendrathecoder29-Apr-10 19:18 
AnswerRe: Error in Windows CE Emulator Pin
nagendrathecoder29-Apr-10 19:27
nagendrathecoder29-Apr-10 19:27 
QuestionAdding new Deployment targets, Platforms, SDKs to Visual Studio 2005 Pin
kastech26-Apr-10 20:01
kastech26-Apr-10 20:01 
AnswerRe: Adding new Deployment targets, Platforms, SDKs to Visual Studio 2005 Pin
KingsGambit27-Apr-10 21:14
KingsGambit27-Apr-10 21:14 
GeneralRe: Adding new Deployment targets, Platforms, SDKs to Visual Studio 2005 Pin
kastech28-Apr-10 0:17
kastech28-Apr-10 0:17 
AnswerRe: Adding new Deployment targets, Platforms, SDKs to Visual Studio 2005 Pin
Michel Godfroid28-Apr-10 0:22
Michel Godfroid28-Apr-10 0:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.