Jump to content

MMoi

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

0 Neutral

About MMoi

  • Rank
    Newbie

Profile Information

  • Your Current Device(s)
    Samsung Omnia
  1. Ha yeah, you're right, still it woudn't work on HTC... I guess in this case I should create a plugin for g-sensor that would load the needed DLL on runtime with LoadLibrary (as I did for renderer and audio API)... but I'm pretty lazy to do it for g-sensor (and short of time, this would need me something like 2 or 3 days of implementation), maybe I'll do it when I'll have to support more than 2 or 3 devices :D Sure, I didn't express my thoughts correctly. What I meant is : - first I call CreateFile AND DeviceIoControl (with AccOnRot) once to initialize the sensor - then on (almost) each update I call DeviceIoControl (with AccReadValues) to get the values, as you do - finally I call DeviceIoControl (with AccOfRot) and then CloseHandle() to uninit the sensor The main differences between our implementations are that - I CreateFile only once and not each time I want to get the data. Isn't it a lack of optimization in your implementation ? I actually don't know if CreateFile is much time consuming, but I try to have as much "global" (or at least member) variables as I can to save time on the CPU (except heavy elements such as sound/textures, that I unload as soon as I can to stay far from the frightening virtual mem cap) - I use 3 different calls to DeviceIoControl. This is the part I just scrapped from Koushik work, I thought it was needed but it seems you don't use them at all... thus i'm not quite sure myself why I need them ;)
  2. GinKage again ! Is there something you don't know about this device ? :( 1st option is possible, but i'd like to avoid it... it would mean create one exe for each device I want to support 2nd option means also one SDK for each machine, what I'd like to avoid for something as "trivial" as g-sensor (I do it for 3d renderer, though, using a wrapping DLL for each API - OGLES or D3DM) 3d option seems the best, that's what I was looking for but I still have few questions : - the drive code has been changed from ACS1 in Omnia to ACC1 in Omnia 2, as well as operation codes (from 0x3F7 to 0x80122EF0 in the read values example). Is there a way to know (programatically or some doc) what codes are used in a device ? It would allow me to adapt each values for each device. It would help me also to get the other codes, since I'm using a little different process from yours : I first init the sensor one time (with ACCOnRot, see below), then read the sensors (with ACCGetStateRot) and finaly uninit it once (ACCOffRot) - if such information is unavailable, could you please give me the remaining operation codes I shall use for Omnia 2 ? Omnia 1 operation codes I use are as follows : #define ACCGetStateRot 0x460 // get on/off state #define ACCOnRot 0x44E // on #define ACCOffRot 0x44F // off #define ACCReadValues 0x3F7 // compute value Thanks a lot :D Note: FYI here is the way I read data (Koushik way once again) #define DIMENSION 3 #define samsungScaleFactor (1.0 / 1000.0 * 9.8 * 3.3793103448275862068965517241379) const int inReadSize = sizeof(int); const int outReadSize = sizeof(int) * DIMENSION; int outBuffer[DIMENSION]; int inBuffer[1]; DWORD bytesReturned = 0; if (!DeviceIoControl(readFile, ACCReadValues, inBuffer, inReadSize, outBuffer, outReadSize, &bytesReturned, NULL)) { CWarning(_T("[CSamsungGSensor] error in g-sensor\n")); return Ret; } // compute normalized float value Ret.value = TVector3F((float)outBuffer[0], (float)outBuffer[1], -(float)outBuffer[2]) * (float)samsungScaleFactor; [/codebox] Ret being just a structure to store my vector...
  3. Hi all, one more question about Omnia 2, I'll try to make it quick this time. I'm trying to use DeviceIoControl method to access Omnia 2 g-sensor as Koushik explains it in his excellent unified sensor API articles. For sensor initialization, it gives something like that : #define ACCOnRot 0x44E // on HANDLE hFile = CreateFile(L"ACS1:", 0, 0, NULL, OPEN_EXISTING, 0, NULL ); if (hFile == INVALID_HANDLE_VALUE) return; DWORD bytesReturned = 0; DWORD InBuffer = 0; DWORD InSize = sizeof(DWORD); DWORD OutBuffer = 0; DWORD OutSize = sizeof(DWORD); BOOL result = DeviceIoControl(hFile, ACCOnRot, &InBuffer, InSize, &OutBuffer, OutSize, &bytesReturned, NULL); ... [/codebox] However, this doesn't work anymore on the Omnia 2, and the application can't create a valid handler through CreateFile. Seems the method has been locked or the handler removed... don't know. I guess I should look into windows API or some documentation to find a workaround, but I don't really know where... any idea ? Thanks :D
  4. hehe, thanks for the tip again, I'll give a try to the Meizu libs.
  5. So, I'll ask one more question (sorry I'm pretty slow), what is the difference between the libs you gave me and the libs in Cute20 project ? Where do the Cute20 OGLES lib come from if not from Meizu M8 SDK ? Thanks again for you precious help :D
  6. GinKage I'm not sure I understand. Yeah, the Cute20 project points to local .lib file, but that's why I downloaded it ! Samsung didn't deliver yet any .lib file to link my app to their OGLES implementation dll, and since it seems to me that such a .lib is required during linking, I'm looking for a .lib and couldn't find any other one than M8. Your file contains lib files... thanks a lot ! I'll check that tomorrow :D But, if I may ask, where did you find these files ? Did you get them from Samsung or another source ? Did you produce them yourself (how and with which input files ?) ? I'm pretty curious about all of this, I feel like I missed some part of the logic. Something like "hey, why not anyone worrying about this .lib files ? and why do everyone produce dll files (you can find on the device) instead of what seems really useful ? and why couldn't I find these .lib during my research, then get if so easily just asking once ?"). As you can see, I'm quite disoriented.
  7. As adviced by a member of the forum, here is a copy of the topic I created about developping an openGL ES app on Omnia 2 : I'm trying to develop an openGL ES application for Korean Omnia 2, but I can't find a way to make it work. I thereby request some help to programmers around :( the facts - Korean Omnia 2 is equivalent to Verizon Omnia II dowgraded to WM6.1 - it's shipped with libGLESv2.dll, libEGL.dll, and libGLESv1_CM.dll - samsung hasn't yet delivered any SDK including OpenGL ES lib I saw a part of the current topic, but it seems to be user-oriented (run HD2 apps and such) more than dev-oriented (compile & deploy homemade app). Also, its 23 pages make it a little scary to look into beyond 10 of them ;) As an base start, I manage to make work D3DM application on the Omnia 2, using either the original BVS driver or the Omnia 1 XScale driver. But, as most of you may know, D3DM sucks. And on a device that is said to support HW acceleration on OGLES, it sucks even more :D . Here I go with my OGLES application tries. As far as I know, I need a LIB to link with some OGLES DLL, so I looked for one that could suit... I tried to download Meizu SDK with Cube sample (as explained here) from there. The application itself compiles fine under Visual studio 2005 (with SP1 and WM6 SDK), but it won't run on the device. Copying the libGLESv2.dll from the sample or libGLESv2.dll and its friends from Omnia 2 windows directory to the application folder won't work better. It just says it can't start the application. I tried create a new c++ device project using the same sample code, the result is the same. Here I am, pretty lost on how I could get an OpenGL ES application running on this damn phone (except using the fully software solution of Vincent3D, which is not an option) without waiting for Samsung to move their fat... libraries. If you read everything to this point, you may be brave enough to give me some help or hint, thus thanks in advance for all your precious advices :D Thanks again..
  8. Yeah, that's the 23 pages thread. As far as I saw (less than 10 pages), people there just talk about what runs and what doesn't on Omnia. But I'm looking for information on the development side... i.e. LIB files for link step on the compiler, not only DLL for runtime on the device. btw, the implementation may be bad compared to HTC but still be useful. Running an app specially designed for Omnia2 specs may give different results from running apps designed for a HTC device specs. Thanks anyway, any other piece of advice ?
  9. Hi everyone, I'm trying to develop an openGL ES application for Korean Omnia 2, but I can't find a way to make it work. I thereby request some help to programmers around :( the facts - Korean Omnia 2 is equivalent to Verizon Omnia II dowgraded to WM6.1 - it's shipped with libGLESv2.dll, libEGL.dll, and libGLESv1_CM.dll - samsung hasn't yet delivered any SDK including OpenGL ES lib I saw there is a topic about OpenGL ES pinned in this forum, but (from the few first and last pages) it seems to be user-oriented (run HD2 apps and such) more than dev-oriented (compile & deploy homemade app). Also, its 23 pages make it a little scary to look into beyond 10 of them ;) As an base start, I manage to make work D3DM application on the Omnia 2, using either the original BVS driver or the Omnia 1 XScale driver. But, as most of you may know, D3DM sucks. And on a device that is said to support HW acceleration on OGLES, it sucks even more :D . Here I go with my OGLES application tries. The concept is as follows : I need a LIB to link with some OGLES DLL, so I looked for one that could suit... first I tried to download Meizu SDK with Cube sample (as explained here) from there. The application itself compiles fine under Visual studio 2005 (with SP1 and WM6 SDK), but it won't run on the device. Copying the libGLESv2.dll from the sample or libGLESv2.dll and its friends from Omnia 2 windows directory to the application folder won't work better. It just says it can't start the application. I tried create a new c++ device project using the same sample code, the result is the same. Here I am, pretty lost on how I could get an OpenGL ES application running on this damn phone (except using the fully software solution of Vincent3D, which is not an option) without waiting for Samsung to move their fat... libraries. If you read everything to this point, you may be brave enough to give me some help or hint, thus thanks in advance for all your precious advices :D Cheers
  10. Hi WinMo developers, as a first topic, I have of course some development questions, but I also intend to turn this first topic to some knowledge base about c++ audio development for handheld devices, so that it may be as much useful for other users than for me. I'm conducting a small survey about audio libraries to include them in some game I'm creating for Windows mobile device (and maybe later on Iphone and others). Therefore, I'm looking for the bests audio libraries that would fulfill my needs, as described later on. Since the following lines of this topic may turn to a long list of needs, libraries and features, I'll start by asking my first question and let you know the details after : What library would you advise to use (or not to use) for digital sound format manipulation with handheld device ? Needed Features Input - open MP3/OGG and WAV files Output - play / pause / stop - multi channel Extras - volume control - 3d sound management would be a nice bonus Requirements - C or C++ library - lightweight (small memory print and CPU usage) - cross-platform (Window Mobile 6.0, Iphone OS) - Free (or low-cost license for commercial use) From this point, I'll make a list of the available libraries I could find and the information I'll find about them from now (I'm still at the beginning of the survey, the point is to be able to receive as much help as this knowledge base could give to anyone looking for audio features on Google and such). MikMod sound library http://mikmod.raphnet.net/ OpenAL http://connect.creativelabs.com/openal/default.aspx http://en.wikipedia.org/wiki/OpenAL FMOD http://www.fmod.org/ http://en.wikipedia.org/wiki/FMOD Audiere http://audiere.sourceforge.net/ DirectSound : NO http://en.wikipedia.org/wiki/DirectSound - Sound library from Microsoft DirectX - Removed from Windows CE in 5.0 in favor to Waveform Audio http://msdn.microsoft.com/en-us/library/aa446919.aspx http://msdn.microsoft.com/en-us/library/ms940101.aspx (Waveform) GStreamer http://en.wikipedia.org/wiki/GStreamer SDL Mixer http://www.libsdl.org/projects/SDL_mixer/ MPG123 http://www.mpg123.de/ Miles Sound System http://en.wikipedia.org/wiki/Miles_Sound_System Open Sound System http://en.wikipedia.org/wiki/Open_Sound_System OpenSL ES http://en.wikipedia.org/wiki/OpenSL_ES PortAudio http://en.wikipedia.org/wiki/PortAudio Simple DirectMedia Layer http://en.wikipedia.org/wiki/Simple_DirectMedia_Layer Simple and Fast Multimedia Library http://en.wikipedia.org/wiki/Simple_and_Fa...timedia_Library This list shall be organized (some APIs only offer file format management, some other only output, some rely on another...) depending on their base features and their abstraction level, completed and refreshed... I hope your replies will help me for this task ;) Thanks for your help, Hoping you'll have fun and a lot of achievements in your development work :D
×

Important Information

By using this site, you agree to our Terms of Use.