Page 2 of 2
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 12:16 am
by LuCiFeR[SD]
please note the addition of extra labels. eg. End_s001:
will make it a lot easier to add extra sounds and to be certain that you do not overrun into the wrong memory area.
Code: Select all
InitSound()
UseOGGSoundDecoder()
Enumeration
#Win
#Text_
#Btn_001
#Btn_002
#Btn_003
#Btn_004
#Btn_005
EndEnumeration
DataSection
s001: IncludeBinary "any.wav": End_s001:
s002: IncludeBinary "any1.wav": End_s002:
s003: IncludeBinary "any.wav": End_s003:
EndDataSection
CatchSound(1, ?s001,?End_s001-?s001)
CatchSound(2, ?s002,?End_s002-?s002)
CatchSound(3, ?s003,?End_s003-?s003)
If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
Repeat
EventID = WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
Select EventGadget()
Case #Btn_001 : PlaySound(1)
Case #Btn_002 : PlaySound(2)
Case #Btn_003 : PlaySound(3)
Case #Btn_004 : End
Case #Btn_005 : StopSound(-1)
EndSelect
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 3:50 pm
by PremierePRO
Still the same error!
I can not figure it out, maybe there is a limit of files that can be included?
Maybe I should load the sounds from the hdd, but I'd need them to be loaded from the directory where you installed the software ....
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 5:19 pm
by LuCiFeR[SD]
yeah, perhaps... I would say it is more likely that your total included files are larger than your available memory. Although I am not 100% certain of that, it is purely guesswork on my part.
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 5:25 pm
by PremierePRO
Is there a way to assign a larger amount of memory to software?
At the same code, I tried to integrate the sounds in ogg format (100mb less) but are not played .....
Someone, if I recall, I said that ogg can not be used with IncludeBinary but must be converted into code, I used a code in the forum that does this, but then I do not know how to integrate in my software!
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 5:36 pm
by LuCiFeR[SD]
Works fine for me, but I have not tested more sounds than the 3 here....
Code: Select all
InitSound()
UseOGGSoundDecoder()
Enumeration
#Win
#Text_
#Btn_001
#Btn_002
#Btn_003
#Btn_004
#Btn_005
EndEnumeration
DataSection
IncludePath "E:\Music\"
s001: IncludeBinary "your1.ogg": End_s001:
s002: IncludeBinary "your2.ogg": End_s002:
s003: IncludeBinary "your3.ogg": End_s003:
EndDataSection
CatchSound(1, ?s001,?End_s001-?s001,#PB_Sound_Streaming)
CatchSound(2, ?s002,?End_s002-?s002,#PB_Sound_Streaming)
CatchSound(3, ?s003,?End_s003-?s003,#PB_Sound_Streaming)
If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
Repeat
EventID = WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
Select EventGadget()
Case #Btn_001 : PlaySound(1)
Case #Btn_002 : PlaySound(2)
Case #Btn_003 : PlaySound(3)
Case #Btn_004 : End
Case #Btn_005 : StopSound(-1)
EndSelect
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 7:20 pm
by PremierePRO
LuCiFeR[SD] wrote:Works fine for me, but I have not tested more sounds than the 3 here....
Code: Select all
InitSound()
UseOGGSoundDecoder()
Enumeration
#Win
#Text_
#Btn_001
#Btn_002
#Btn_003
#Btn_004
#Btn_005
EndEnumeration
DataSection
IncludePath "E:\Music\"
s001: IncludeBinary "your1.ogg": End_s001:
s002: IncludeBinary "your2.ogg": End_s002:
s003: IncludeBinary "your3.ogg": End_s003:
EndDataSection
CatchSound(1, ?s001,?End_s001-?s001,#PB_Sound_Streaming)
CatchSound(2, ?s002,?End_s002-?s002,#PB_Sound_Streaming)
CatchSound(3, ?s003,?End_s003-?s003,#PB_Sound_Streaming)
If OpenWindow(#Win, 0, 0, 800, 25, "DEMO", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
ButtonGadget(#Btn_001, 0, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_002, 160, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_003, 320, 0, 160, 25, "DEMO")
ButtonGadget(#Btn_004, 480, 0, 160, 25, "QUIT")
ButtonGadget(#Btn_005, 640, 0, 160, 25, "STOP")
Repeat
EventID = WaitWindowEvent()
Select EventID
Case #PB_Event_Gadget
Select EventGadget()
Case #Btn_001 : PlaySound(1)
Case #Btn_002 : PlaySound(2)
Case #Btn_003 : PlaySound(3)
Case #Btn_004 : End
Case #Btn_005 : StopSound(-1)
EndSelect
Case #PB_Event_CloseWindow
End
EndSelect
ForEver
EndIf
You are great!
Now I have finished editing the code (For the moment I have 305 sounds) .... everything OK ....
If you switch from Naples, pizza and beer paid
PS. Would you know well how to integrate a VU-Meter digital and maybe you also know how to integrate a code that allows me to resize the window and buttons, widening and narrowing window?
Thank you and I'm sorry, but I am a beginner!
Re: POLINK: fatal error: Internal error: write_executable_im
Posted: Sun May 05, 2013 8:20 pm
by LuCiFeR[SD]
Happy I could help in some small way. We were all beginners once! I do love a good puzzle, hence why I looked at this forum thread

Pizza and beer sounds good for me my friend hehe. One day I may take you up on that very kind offer.
as for the VU meter, I am not so sure I have never really investigated/needed to use such things under the windows operating system.... Although I would wager that somebody here does have the knowledge you seek. GUI scaling... again, its not really something I have done, as application programming is not what I use purebasic for. I know there is the
PureRESIZE library you may find more if you search the forum.
hopefully, somebody else with the needed skills will step in and teach you the knowledge I lack
