Homebrew Homebrew Development

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Code:
// Check if user is in GW mode
    if (CSND_initialize(NULL)==0){
    CSND_shutdown();
    GW_MODE = false;
    }else{
    GW_MODE = true;
    }

This is how i check a GW/N3DS on lpp-3ds.

Wait can you explain this code? GW_MODE is set to true if it's in gateway mode? And if not, it shutdown CSND?

also, which bit resolution and sampling rate do i have to use for converting the wav file?
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
CSND cannot be initialized with GW so you can check if your homebrew is started from ninjhax or from a GW/other flashcard by seeing what's the result of the CSND initialization (Note that also N3DS cannot initialize CSND).
 

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
Country
Gambia, The
Someone knows how to use gyroscope?

I tried to use this:
Code:
hidScanInput();
    irrstScanInput();
HIDUSER_EnableGyroscope();
float value;
        HIDUSER_GetGyroscopeRawToDpsCoefficient(&value);

But ninjhax crashes when i try it.
You should try it with
Code:
hidScanInput();
irrstScanInput();
EnableGyroscope();
float value;
GetGyroscopeRawToDpsCoefficient(&value);
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
CSND cannot be initialized with GW so you can check if your homebrew is started from ninjhax or from a GW/other flashcard by seeing what's the result of the CSND initialization (Note that also N3DS cannot initialize CSND).

Ok but why do you shutdown CSND if it has been correctly initialized?

also, which bit resolution and sampling rate do i have to use for converting the wav file?
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
You should try it with
Code:
hidScanInput();
irrstScanInput();
EnableGyroscope();
float value;
GetGyroscopeRawToDpsCoefficient(&value);

Solved the problem few minutes ago but i still don't know how to properly get gyroscope status. It seems values are random like it's not calibrated.
When i try do do something like (z * value) where z is the Z result of hidGyroRead, i get variable values even if 3DS is not moving :/

Bitpersample and samplerate can be selected by your own, you have to take them with your WAV decoder by the header.
I shut CSND because lpp-3ds provides itself a function to initialize CSND (Sound.init).
 

Technicmaster0

Well-Known Member
Member
Joined
Oct 22, 2011
Messages
4,406
Trophies
2
Website
www.flashkarten.tk
XP
3,497
Country
Gambia, The
Solved the problem few minutes ago but i still don't know how to properly get gyroscope status. It seems values are random like it's not calibrated.
When i try do do something like (z * value) where z is the Z result of hidGyroRead, i get variable values even if 3DS is not moving :/
I think that you should use "hidGyroRead(angularRate* rate)".
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
Solved the problem few minutes ago but i still don't know how to properly get gyroscope status. It seems values are random like it's not calibrated.
When i try do do something like (z * value) where z is the Z result of hidGyroRead, i get variable values even if 3DS is not moving :/

Bitpersample and samplerate can be selected by your own, you have to take them with your WAV decoder by the header.
I shut CSND because lpp-3ds provides itself a function to initialize CSND (Sound.init).

Alright, so i put your code just at the top of my code (without csnd shutdown) and then i use GW_MODE to check if i can use it or not to use it?
 

AlbertoSONIC

Pasta Team Member
Member
Joined
Jun 27, 2014
Messages
927
Trophies
0
Age
52
Website
www.albertosonic.com
XP
1,396
Country
Italy
I'm trying to convert it using audacity, but all i'm getting is a strange sound... Could someone convert this .wav file? https://www.dropbox.com/s/4oxxt9v7yko2cjr/POP.wav?dl=0

I also tried to cut the header using an hex editor, but it worked partially. The sound is similar to the one i'm trying to convert, but it has a loud and strange sound at the end..
 

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
29
Location
Bologna
Website
rinnegatamante.it
XP
4,857
Country
Italy
I'm trying to convert it using audacity, but all i'm getting is a strange sound... Could someone convert this .wav file? https://www.dropbox.com/s/4oxxt9v7yko2cjr/POP.wav?dl=0

I also tried to cut the header using an hex editor, but it worked partially. The sound is similar to the one i'm trying to convert, but it has a loud and strange sound at the end..

Probably you give an incorrect size to audiobuffer or incorrect samplerate.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-