Welcome, Guest. Please login or register.

Author Topic: String, Dstring, and Char[] oh my...  (Read 3193 times)

0 Members and 1 Guest are viewing this topic.

malkierian

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: String, Dstring, and Char[] oh my...
« Reply #15 on: December 28, 2013, 12:32:50 am »
Alright, I figured out that the issue with the debug stuff was that I had forgotten to copy the .dll files into my project workspace so it would copy the new ones instead of the old ones.  However, despite not getting the "Stream closed?" message, it still freezes on me when trying to load the file from the path given by the file window.  If it's OK with you, I'd like to send you a zip with my project inside so you can look at this yourself, because I must obviously be missing something (and it consists of 5 source files, some images, etc).

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: String, Dstring, and Char[] oh my...
« Reply #16 on: December 28, 2013, 12:42:33 am »
Sure. I'd be glad to look at it.

My email is dehaan.jeremiah@gmail.com
DSFML - SFML for the D Programming Language.

malkierian

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: String, Dstring, and Char[] oh my...
« Reply #17 on: December 29, 2013, 06:17:47 am »
Any luck with this, Jebbs?

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: String, Dstring, and Char[] oh my...
« Reply #18 on: December 29, 2013, 06:30:40 am »
Haven't been able to get to it quite yet, sorry. Work is slowing down for the now though, so I'll get off pretty early tomorrow.  I planned on looking at this then and I'll let you know once I see something!
DSFML - SFML for the D Programming Language.

malkierian

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: String, Dstring, and Char[] oh my...
« Reply #19 on: December 29, 2013, 07:45:16 am »
Ah, ok, no problem.

Jebbs

  • Sr. Member
  • ****
  • Posts: 358
  • DSFML Developer
    • View Profile
    • Email
Re: String, Dstring, and Char[] oh my...
« Reply #20 on: December 29, 2013, 09:36:57 pm »
Had a chance to look at some code!

It took me a bit to get things set up since I didn't have any Derelict stuff, so I just added the source files directly instead of messing around with building static libraries. The ones I used were https://github.com/DerelictOrg/DerelictAL and https://github.com/DerelictOrg/DerelictUtil, which could be newer than what you are using since all of the OpenAL stuff is in a single file now as opposed to being in derelict.openal.al, derelict.openal.types, and derelict.openal.functions.

Any who, the only changes I made to your files were in soundactor.d, where I commented out importing derelict.openal.types and derelict.openal.functions, and then I uncommented lines 105:
sound.setBuffer(buffer);
and 107:
label.setString(to!(dstring)(temp[(temp.lastIndexOf('\\') + 1)..$ - 4].dup));

Once I added libsndfile-1.dll into the bin folder, I ran it, selected a file, and then hit the play button....and well, it worked. Granted, I did get some runtime memory errors on occasion which are probably related to the sound class(I know how I'll fix them), but it loaded the sound file(I used both a .wav and a .ogg) and played it. It would only play a single file each time I ran the program, though. It worked in both debug and release configurations. I used my own dsfml-xxx-2.lib files, but I used the included dll's.



So...yeah.. I really wish I could help but I don't know what I could do. Unless there was more that I needed to uncomment to see the error, it sounds like it is something in your own code.
DSFML - SFML for the D Programming Language.

malkierian

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: String, Dstring, and Char[] oh my...
« Reply #21 on: December 29, 2013, 09:53:07 pm »
Could you send me your DSFML lib and dll files so I could test it to make sure it wasn't because I was building it wrong?  I'll try updating my build of Derelict as well.

On a separate note, I'm starting to think that I must be missing more drivers, or it's trying to load more 64-bit drivers, as if I don't have libsndfile-1.dll copying over to the directory, it doesn't run at all.
« Last Edit: December 29, 2013, 10:05:06 pm by malkierian »

 

anything