Skip to content

Commit

Permalink
add readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragod committed Oct 16, 2023
1 parent 28817dc commit 44dc81e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 0 additions & 6 deletions MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,10 @@ private async void stationName_SelectionChanged(object sender, SelectionChangedE
}
catch (NAudio.MmException ex)
{
// Log the exception or display an error message to assist with debugging
MessageBox.Show($"NAudio.MmException: {ex.Message}");
}
catch (Exception ex)
{
// Handle other exceptions if needed
MessageBox.Show($"Exception: {ex.Message}");
}
}
Expand Down Expand Up @@ -138,26 +136,22 @@ private async Task PlayAudioStreamAsync(string mp3Url, int maxRetries = 3, TimeS
}
catch (NAudio.MmException ex)
{
// Log the exception or display an error message for debugging purposes
MessageBox.Show($"NAudio.MmException: {ex.Message}");

retryCount++;
if (retryCount < maxRetries)
{
// Delay before retrying
await Task.Delay(retryDelay);
}
}
catch (Exception ex)
{
// Handle other exceptions if needed
MessageBox.Show($"Exception: {ex.Message}");
}
}

if (!success)
{
// Handle the failure after reaching the maximum number of retries
MessageBox.Show("Failed to play audio stream after multiple retries.");
}
}
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Stations

![alt text](/resources/stations.png)

Just click and play a radio station!

Stations is a C# Wpf Xaml app.

## How to use

- Open with Visual Studio
- Restore Nuget packages
- Build Release
Binary file added resources/stations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 44dc81e

Please sign in to comment.