pcc
Well-known Member
- Joined
- Jan 21, 2003
- Messages
- 1,382
- Office Version
- 2021
- Platform
- Windows
I have this code as part of a much bigger project to play mp3 files (where the filename, in this case, is in Cells(r, 1). It fires up Windows Media Player and plays the file.
Many of the files have been recorded from internet radio stations, and often they are not 'clean' - for example they may have the tail end of a previous song at the start, or the beginning of another song at the end. If this is the case, I can use an mp3 editor to trim away the unwanted bits.
If a file starts to play, and it has unwanted stuff at the start, I can flag it for editing later on and progress to the next file. However, a file might be 'clean' at the start, and have rubbish at the end, and the only way I can tell is to let the file finish playing to see if there is any rubbish at the end, and this obviously takes time. I would ideally like to be able to advance Media Player towards the end of the file to see if this is the case. My system knows the length of each mp3 file, so I would like to advance it to, say, 5 seconds before the end. I could then vet each file much quicker.
Can anyone suggest a way in which this could be achieved?
All suggestions welcomed!
Thanks
Many of the files have been recorded from internet radio stations, and often they are not 'clean' - for example they may have the tail end of a previous song at the start, or the beginning of another song at the end. If this is the case, I can use an mp3 editor to trim away the unwanted bits.
If a file starts to play, and it has unwanted stuff at the start, I can flag it for editing later on and progress to the next file. However, a file might be 'clean' at the start, and have rubbish at the end, and the only way I can tell is to let the file finish playing to see if there is any rubbish at the end, and this obviously takes time. I would ideally like to be able to advance Media Player towards the end of the file to see if this is the case. My system knows the length of each mp3 file, so I would like to advance it to, say, 5 seconds before the end. I could then vet each file much quicker.
Can anyone suggest a way in which this could be achieved?
All suggestions welcomed!
Thanks
VBA Code:
Set wmp = CreateObject("new:6BF52A52-394A-11D3-B153-00C04F79FAA6")
With wmp
.URL = Cells(r, 1)
.Controls.Play
End With