Author Topic: Wave out to temp file first  (Read 5418 times)

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Wave out to temp file first
« on: September 06, 2010, 10:42:03 »
This is a very small request.

Basically, when you export to a wave file, it generates a wavefile on the fly.

The request is that it first exports its wave file to a hidden tempfile in that directory named $!^$~_temp.wav or something like that, and once the wavefile has been exported, it renames the file to the filename you selected.

There are a few reasons behind this request.

1. If you're overwriting a wavefile, and the export fails somehow, then you haven't lost the previous version.

2. I'm running backup software that backups the wavefile during the export so I get a backupped version of say... 260kb, while the wavefile is 15mb.

Because of the 2nd issue, it might require the wave export function to set the last modified date after the export has been completed.

EDIT: On second thought, its best if the file gets written in %TEMP%, and moved when completed. This is the behavior of other programs too.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline jmkz

  • Workaholic artist
  • ***
  • Posts: 195
  • Gender: Male
    • jmkz Productions
  • Operating System: Windows Server 2012 R2
Wave out to temp file first
« Reply #1 on: September 07, 2010, 05:05:47 »
I like this one too  :wink: +1

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Wave out to temp file first
« Reply #2 on: September 10, 2010, 09:22:36 »
Posted an edit. See first post.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,247
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: Wave out to temp file first
« Reply #3 on: September 10, 2010, 10:39:58 »
Quote from: "LPChip"
EDIT: On second thought, its best if the file gets written in %TEMP%, and moved when completed. This is the behavior of other programs too.

I'd say that a fair amount of programs which use temp files don't use this. I know quite a few.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Re: Wave out to temp file first
« Reply #4 on: September 10, 2010, 12:07:23 »
Quote from: "Jojo"
Quote from: "LPChip"
EDIT: On second thought, its best if the file gets written in %TEMP%, and moved when completed. This is the behavior of other programs too.

I'd say that a fair amount of programs which use temp files don't use this. I know quite a few.


I didn't say all other programs.

But the alternative would be to have a configurable temp location. Works for me too, but since its only for wave export, %temp% would probably be sufficient.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline g

  • Workaholic artist
  • ***
  • Posts: 280
Re: Wave out to temp file first
« Reply #5 on: September 10, 2010, 23:09:18 »
I don't really see the problem... I mean, why overwrite a saved wav that you might want to keep? If the export would for some reason crash, you would just re-export it. But what if it didn't crash but just turned out sounding like crap?

For the other issue, I think you need a new back up program. It really should check file size when syncing, not just modified date.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Re: Wave out to temp file first
« Reply #6 on: September 11, 2010, 09:32:27 »
Quote from: "g"
I don't really see the problem... I mean, why overwrite a saved wav that you might want to keep? If the export would for some reason crash, you would just re-export it. But what if it didn't crash but just turned out sounding like crap?

For the other issue, I think you need a new back up program. It really should check file size when syncing, not just modified date.


I can't change my backup program even if its crap. I pay for the service on my ISP and the backup is stored on their servers. I need this functionality in case something happens to my pc and I lose the data on my entire harddrive. I can't afford to lose these files, so I store them online automatically.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,247
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Re: Wave out to temp file first
« Reply #7 on: September 11, 2010, 11:17:51 »
Quote from: "LPChip"
I can't change my backup program even if its crap. I pay for the service on my ISP and the backup is stored on their servers. I need this functionality in case something happens to my pc and I lose the data on my entire harddrive. I can't afford to lose these files, so I store them online automatically.

It's not like they're aliens and not open to suggestions concerning their backup program, though.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Re: Wave out to temp file first
« Reply #8 on: September 11, 2010, 11:59:16 »
Quote from: "Jojo"
Quote from: "LPChip"
I can't change my backup program even if its crap. I pay for the service on my ISP and the backup is stored on their servers. I need this functionality in case something happens to my pc and I lose the data on my entire harddrive. I can't afford to lose these files, so I store them online automatically.

It's not like they're aliens and not open to suggestions concerning their backup program, though.


They're not aliens and they're not open to feedback either. Besides, I have so much in my backup, I fear that if I complain, they cancel my backup alltogether.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,247
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Wave out to temp file first
« Reply #9 on: September 11, 2010, 12:51:21 »
You are not supposed to complain, you are supposed to make a suggestion. Why would a company cancel a contract with their clients if they make a suggestion? They rather implement them, because they might lose their clients if they don't.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Wave out to temp file first
« Reply #10 on: September 11, 2010, 14:37:04 »
Quote from: "Jojo"
You are not supposed to complain, you are supposed to make a suggestion. Why would a company cancel a contract with their clients if they make a suggestion? They rather implement them, because they might lose their clients if they don't.


Come on... don't find excuses so you don't have to do this suggestion. Or you might lose a paying customer ;)
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 6,247
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 7 x64
Wave out to temp file first
« Reply #11 on: September 11, 2010, 15:46:50 »
Paying? I don't see any money! :nuts:
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline LPChip

  • Administrator
  • *****
  • Posts: 4,956
    • http://lpchip.nl
  • Operating System: Windows 10 Pro N (x64bit)
Wave out to temp file first
« Reply #12 on: September 11, 2010, 17:34:06 »
Quote from: "Jojo"
Paying? I don't see any money! :nuts:


I know.. so far people are donating... :nuts: :lol:
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs