Search results

  1. C

    GP32 Old Question: How Many Ticks Are 1 Second ?

    Hi ! Can anyone tell me, how many ticks are 1 second ? I need it for the speed of 133 mhz,100 mhz and 66 mhz. Could you also tell me the values that are needed for GpClockSpeedChange ? Greetingx Tobias PS. Perhaps this question or the correct answers should be pinned ?
  2. C

    GP32 Another Samplesound Question

    Hi ! I just want to ensure myself if this construction is ok: A Struct: struct samples { unsigned short * pSample[8]; unsigned int nSampleLen; /* you see right - 8 samples with the same size */ }; struct samples Sampleset[31]; <now i store in Sampleset[0-31].nSampleLen the size of...
  3. C

    GP32 Im An Idiot

    ireallydontknowwhatiswrongwithhiswritinginenglish
  4. C

    GP32 Fast Calculations

    I would like to calculate new volumes to my sounds and need a possibility to lower it by 3DB (about 70%). Then i could use bitshifts to generate a new volume: 100% -> 50% -> 25% etc 70% -> 35% -> 17.5% etc Let's say i have a 20k sample (16 Bit): unsigned short WaveData[20000] = {...
  5. C

    GP32 Array Of Sounds/samples ?

    Hi ! Thanks, that should help. I'll try it. I thought about defining a struct. But the idea with the size-info is even better. Greetings Tobias
  6. C

    GP32 Array Of Sounds/samples ?

    Hi ! I would like to create an array that contains sounds. Now i have a Snaredrum-Sample in an Array unsigned short SnareDrum[20000] = {x SampleData for 1 Snaredrum x}; then i would play it like this: GpPcmPlay((unsigned short*)SnareDrum,sizeof(SnareDrum),0); but what i need is an array -...
  7. C

    GP32 Pointers To Structs

    Hi ! i have a struct struct mystruct={int x; int y}; and declare 2 variables of its kind: struct mystruct s1 = {10,10}; struct mystruct s2[] = {{10,10}} i have a function: void func(struct mystruct 1* a) ... Now i want to pass an argument to this func: func(s1); //this causes the error...
  8. C

    Gp32blu Firmware Dumped

    Hi ! As i read about these flashing questions and possible problems. Does anybody remember GPBIOS ? http://www.gpbios.tk/ Isn't it ideal for testing the new firmware ? Greetings tobias
  9. C

    GP32 Cutting A String - How ?

    Hi ! I can't understand what the filling of the whole string with \0 is good for. When i declare a string variable: char strA[10]; i define a size of 10 characters (correct me if i'm wrong) and the last char must be \0. When i set the 4th position to \0 then there is still space for 10...
  10. C

    GP32 Your Favourite SDK

    Using DevKitAdv I am writing a helper library with these functions: - pulldown-menues - onscreen-keyboards - y-scrollable list - fileselector and - messagebox And in future, i would like to release this library for the most used SDK's. Until then i have to work very much, i suppose...
  11. C

    GP32 Cutting A String - How ?

    Hi ! Thanks. So i did it in the right way. Greetings Tobias
  12. C

    GP32 Cutting A String - How ?

    Hii ! Let's say i have a string char strA[10]; The string contains "abcdef" but i need only "abc". Is it enough to terminate the string at the needed position ? strA[4] = '\0' Or can i use strncpy (strA,strA,3); or must i use a temp-variable strcpy (strB, strA); strncpy (strA,strB,3)...
  13. C

    GP32 Filenames And Path Problems

    Hi ! I just tested it - it works good. Greetings Tobias
  14. C

    GP32 Filenames And Path Problems

    hi ! thanks. perhaps its a simple solution Greetings tobias
  15. C

    GP32 Filenames And Path Problems

    Hi ! Thanks. But i'm not sure that there are only chars and no digits, since the filesystem allows it. I have an idea: Could i test if there are letters ? Like this ? if (str[i] >= 'A' && str[i] <= 'Z') ... do lowercase ... Greetings Tobias
  16. C

    GP32 Subroutines Returning A String

    Hi ! Thanks so far. But freeing a variable declared in a sub seems problematic to me because it is a source for errors since it's easy to forget it. Could this be a solution ? void SelectFile(char * strStartPath) { // do something with the string using pointers strcpy...
  17. C

    GP32 Subroutines Returning A String

    Hi ! The function in the example is now a bit nonsensical. It just returns the string that was passed to it. The aim will be a file-selector. It starts at the path passed to (strStartPath) it and returns a string containing a chosen file (example: gp:\\gpmm\\drumman.fxe). When i do not free...
  18. C

    GP32 Subroutines Returning A String

    Here i need SelectFile to return a string. Is this example ok ? Should i allocate memory in this case ? ... strcpy(cInputStr,SelectFile("test")); ... char* SelectFile(char * strStartPath) { char * cOutStr; cOutStr = gm_malloc(256); strcpy(cOutStr,strStartPath); gm_free(cOutStr)...
  19. C

    GP32 Filenames And Path Problems

    Hi ! I am writing a file requester for my program (i use devkitadv) and have a problem: The commands for using the filesystem want lower-case filenames but i have all upper-case. How do i convert upper to lower ? Greetings Tobias
  20. C

    GP32 Mr.mirko's Vs. Devkitadv

    Hi ! I continued with the old devkitadv but now i need a good file-handling possibility and i heared that Mirko's has it. But i would like to use possibilities of Mirko's to improve a program i wrote with devkitadv. Any idea ? So i think DevKitArm could bring a solution. But how can i...
Back
Top