News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_EgoTrip

[cpctelera] cpct_akp_setFadeVolume problem

Started by EgoTrip, 12:06, 14 April 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

EgoTrip

Whenever I try to use cpct_akp_setFadeVolume, I get this error message

?ASlink-Warning-Undefined Global '_cpct_akp_setFadeVolume' referenced by module 'main'

It's not urgent for me as I found a way to not use it. But I can't understand why it happens.

SRS

#1
You have to change CPCtelera (if you didn't know that)

https://raw.githubusercontent.com/lronaldo/cpctelera/master/cpctelera/src/audio/arkostracker.s

PLY_UseFades        - Set to 1 to allow fades in / out. A little CPU and memory ;; consuming. _cpct_akp_setFadeVolume becomes available.

.equ PLY_UseFades       , 0

the red part you need to set to 1 and recompile cpctelera.lib

ronaldo

#2
Yes, in this case is a function whose implementation is not available unless you activate it and recompile. This is because it consumes both space and CPU, so it is disabled by default. Therefore, the linker is complaining that the code does not exist, so cannot be linked. Compiler does not complain because it finds the definition of the function in the header file. The problem is only found by the linker, hence the message.

It is planned to add ways to activate/deactivate these parts of the code by API, but that will be for 2.0. most probably :) .

mr_lou

Do you need music for your Amstrad CPC game project?
Take a look at IndieGameMusic.com - that's where I put my tracks.

Powered by SMFPacks Menu Editor Mod