×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Oct 2004
    Posts
    158

    audio.Sound.open('file.amr') appends to file

    Hi,

    I noticed that s = audio.Sound.open('C:\\file.amr') appends instead of overrides. What's the proper way to override the file?

    Cheers,
    Berco

  2. #2
    Regular Contributor
    Join Date
    Sep 2003
    Location
    Finland
    Posts
    209

    Re: audio.Sound.open('file.amr') appends to file

    Originally posted by bercobeute
    I noticed that s = audio.Sound.open('C:\\file.amr') appends instead of overrides. What's the proper way to override the file?
    Delete it e.g. with

    Code:
    os.unlink("c:\\foobar.wav")
    if the file exists. There should be an argument to specify the wanted behaviour (e.g. 'n', 'a') but this is not implemented.

    Notice though that quite many of the Python for Series 60 API calls are expecting the filenames to be in Unicode, i.e.

    Code:
    u'C:\\foobar.wav'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×