-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SaveAs patch #1
Comments
Thanks, It looks like it could work. I have to look at it more closely because there are unwanted parts in the diffs. I'll have a peek at it and possibly integrate it in the main line. |
So, it looks like there's no cross platform issue. The only possible problem I see is that after doing save as, you are still working on the original project - if you further modify the song and save, it's the old one that will be modified - while most software make the newly save project active. This would mean at least re-defining the project alias but possibly other stuff. Look at the loading process, it should be covered there. |
Yes, it's a really big issue to be in the old project... Seem to be fine, and it work from a "functional point of view" on my debian laptop. https://gist.github.com/yoyz/2075e9704ce46a7d67ef Unfortunately I hit a lot of "random but really frequent" crash when the patch change the project. $ gdb ./lgpt.deb-exe : Program received signal SIGSEGV, Segmentation fault. |
Hi Marc, it seem this issue is related to my debian box, some library, RTAudio ??? If you have an idea or you want more info. $ uname -a yoyz@yoyz-laptop:~/lgpt/bin/ ./lgpt.deb-exe.2 |
SIGSEV seem to be fixed with these line in sources/Adapters/RTAudio/RTAudioDriver.cpp : //mainBuffer_=(char *)((((int)unalignedMain_)+1)&(0xFFFFFFFC)) ; More info from the gdb output : |
I would say the issue is that you are making a 64 bit build and so possibly in that case the aligned buffer would end up on a 32-bit boundary rather than 64. I'm unsure doing the straight assignment would work all the time but it's possible I guess. |
Yes it's a 64 bit build, there is not a lot of issue. Just this pointer which make sometimes the soft crash when the project is loaded. And some sounfont headers which check the size of short, long which fail at compile time. I don't know how to handle the mainBuffer_ correctly from a cross platform point of view. |
So, usually when there's potentially api conflicts across plaftforms, I deal with them using adapters. System::GetInstance()->Malloc(size) System in itself is just an installable instance and, depending on the platform, a different version is used. For linux, it would be the one that is in https://github.com/Mdashdotdashn/LittleGPTracker/tree/master/sources/Adapters/DEB/System If you extend the interface https://github.com/Mdashdotdashn/LittleGPTracker/tree/master/sources/System/System with an aligned malloc api and implement the linux version in DEBSystem, then porting it to other system will be simply adding this method too. I know Windows has an equivalent and most other platforms are most likely posix complient. For soundfont, it's probably going to be shitty. This library (and as far as I know the only one available) is from the 90's and they didn't give a fuck back then :D Cool for the patches, try to send them without too many diffs of header changes and so on. Thanks! |
Hi Marc, Ok, I begin to understand how it is done now, this is not a bad idea to split things like this. Not easy to understand first, but not bad at all. It took me days to really understand how thing fit together. I've written the patch, I've check by building them on DEB, PSP, DINGOO. There are multiple patch you can browse it here : https://gist.github.com/yoyz/af1502c26e9680378926 I've split them to make it easier to read, I will try to explain them below : patch_saveas_20140529_DEBSystem patch_saveas_20140529_PSPFileSystem patch_saveas_20140529_AppWindow patch_saveas_20140529_ViewEvent patch_saveas_20140529_ProjectView patch_saveas_20140529_FileSystem.cpp Hope they are not too dirty. Johann |
Fuck yes, it now works on gp2x f100 too. The patch is : patch_saveas_20140530_ProjectView here it is : https://gist.github.com/yoyz/6bad43a91f194ec4a25c Without this last patch, there is a SIGSEV linked to the management of the "projectName" in : Johann |
Thanks. I'll have a look at all that when I got some brain space. The definition of root is different on the platform because of the layout of the install files. I don't want to change them right now because it would mean replacing the current executable on people's machine wouldn't work, they would have to relocate it. Call it legacy :D /M |
Yes, user ( and me too ) don't like to change this, it's painfull to do it on handled. On the midi side, I have played with the gp2x today, and I have found a midi version which work fine : release : "1.2a_044" |
Fuck, the last patch which should resolve the memory free issue on gp2x is not resolving anything. Quoting myself : I had this dmesg, and the apps freeze after a save as : lgpt.gpe: unhandled page fault at pc=0x0005b18c, lr=0x0005b184 (bad address=0x00000000, code 7) So I have not fix anything on the gp2x.... |
Don't worry too much about it. When I'll integrate your code I'll double check it to see if it is sane and fix it if there's an issue. I've got enough milage to be able to do it without any issue :) |
* First stable release! 1.3o-1: Fixed errors when random naming projects (shoutouts to 256k!) Start sample navigation behavior adjusted New: When in Phrase or Table view, FX commands have a help legend at the top of the screen (#68) Official builds for: Miyoo mini Win32 CHIP Raspberry Pi PSP Deb32 Bugs: SCREENMULT no longer applies for PSP (47) Disable default mapping for MIYOO to not conflict with mapping.xml (53) Shoutouts to fpiesik and Sacaredo for help debugging Includes: * Random project name generator! (#54) When entering New in load screen or Save As, select Regen to generate a random name Add manual entry Co-authored-by: djdiskmachine <[email protected]> * Stop playing back samples on exit of sample browser (#23) Hold "A" and navigating up or down to quicker preview when browsing samples Hold "A" and press sideways for folder navigation * Adds filter attenuation (#9) * Piggy Tracker config & mapping guides (#14) Co-authored-by: INFU <[email protected]> * Change default colors dark theme pink hue default (#15) Co-authored-by: djdiskmachine <[email protected]> * Improve sample browser (#52) (#55) Preview with start Browse preview with start + up / down Load sample with start + right Navigate up in folder structure with start + left Bump build number Hold A and press up to ".." to navigate one level up B navigation no longer wraps around but stays at end points Co-authored-by: djdiskmachine <[email protected]> * Unify cursor color (#24) Cursor now has the same color everywhere Co-authored-by: djdiskmachine <[email protected]> * Add save as (#12) Save As option in Project page Mdashdotdashn#1 Shoutouts yoyz! Co-authored-by: yoyz <[email protected]> * Miyoo mini release (#43) Co-authored-by: Nine <[email protected]> * Add ability to change font (#50) Co-authored-by: subnixr <[email protected]> * Update license License changed from MIT to CC BY-NC-SA 4.0
Hi Marc,
I've written a small patch which allow to have a "save as" feature.
Could you review it and tell me what's ok and what is wrong in the implementation in order to allow me to fix it.
IMHO, there is issue, because near everything is implemented in "ProjectView.cpp" which is not the right place, but it should be fixable, I don't know where could it be implemented so a review could help.
For now it's more a "copy as" feature than a "save as", but it work on my laptop, don't have try on dingoo/psp/gp2x.
You can review it here :
https://gist.github.com/yoyz/2789e907a9dd5124f4c9
yoyz
The text was updated successfully, but these errors were encountered: